@ionic/core 8.4.4-dev.11738233295.1e8971df → 8.4.4-dev.11738234035.16d5592e
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 +6 -4
- package/components/ion-select.js +6 -4
- package/components/radio-group.js +4 -2
- package/dist/cjs/ion-checkbox.cjs.entry.js +5 -4
- package/dist/cjs/ion-radio_2.cjs.entry.js +3 -2
- package/dist/cjs/ion-select_3.cjs.entry.js +5 -4
- package/dist/cjs/ionic.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/checkbox/checkbox.js +23 -4
- package/dist/collection/components/radio-group/radio-group.js +21 -2
- package/dist/collection/components/select/select.js +23 -4
- package/dist/docs.json +67 -1
- package/dist/esm/ion-checkbox.entry.js +5 -4
- package/dist/esm/ion-radio_2.entry.js +3 -2
- package/dist/esm/ion-select_3.entry.js +5 -4
- package/dist/esm/ionic.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm-es5/ion-checkbox.entry.js +1 -1
- package/dist/esm-es5/ion-radio_2.entry.js +1 -1
- package/dist/esm-es5/ion-select_3.entry.js +1 -1
- package/dist/esm-es5/ionic.js +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/html.html-data.json +12 -0
- package/dist/ionic/ionic.esm.js +1 -1
- package/dist/ionic/{p-7ddc46c3.system.entry.js → p-29a5d6ed.system.entry.js} +1 -1
- package/dist/ionic/p-322c5fb4.system.js +1 -1
- package/dist/ionic/p-6c95736e.entry.js +4 -0
- package/dist/ionic/{p-69666e8a.system.entry.js → p-8ac07653.system.entry.js} +2 -2
- package/dist/ionic/{p-fd1c40cc.system.entry.js → p-9f364443.system.entry.js} +1 -1
- package/dist/ionic/{p-6d6cedc5.entry.js → p-bb5d8e9e.entry.js} +1 -1
- package/dist/ionic/p-d7dd8fb1.entry.js +4 -0
- package/dist/types/components/checkbox/checkbox.d.ts +6 -0
- package/dist/types/components/radio-group/radio-group.d.ts +4 -0
- package/dist/types/components/select/select.d.ts +6 -0
- package/dist/types/components.d.ts +24 -0
- package/hydrate/index.js +16 -10
- package/hydrate/index.mjs +16 -10
- package/package.json +1 -1
- package/dist/ionic/p-1a11f49f.entry.js +0 -4
- package/dist/ionic/p-908d6080.entry.js +0 -4
package/hydrate/index.js
CHANGED
|
@@ -8497,6 +8497,7 @@ class Checkbox {
|
|
|
8497
8497
|
this.labelPlacement = 'start';
|
|
8498
8498
|
this.justify = undefined;
|
|
8499
8499
|
this.alignment = undefined;
|
|
8500
|
+
this.required = false;
|
|
8500
8501
|
}
|
|
8501
8502
|
componentWillLoad() {
|
|
8502
8503
|
this.inheritedAttributes = Object.assign({}, inheritAriaAttributes(this.el));
|
|
@@ -8508,11 +8509,11 @@ class Checkbox {
|
|
|
8508
8509
|
}
|
|
8509
8510
|
}
|
|
8510
8511
|
render() {
|
|
8511
|
-
const { color, checked, disabled, el, getSVGPath, indeterminate, inheritedAttributes, inputId, justify, labelPlacement, name, value, alignment, } = this;
|
|
8512
|
+
const { color, checked, disabled, el, getSVGPath, indeterminate, inheritedAttributes, inputId, justify, labelPlacement, name, value, alignment, required, } = this;
|
|
8512
8513
|
const mode = getIonMode$1(this);
|
|
8513
8514
|
const path = getSVGPath(mode, indeterminate);
|
|
8514
8515
|
renderHiddenInput(true, el, name, checked ? value : '', disabled);
|
|
8515
|
-
return (hAsync(Host, { key: '
|
|
8516
|
+
return (hAsync(Host, { key: '07a5884062dd256b570e856270c74a5a09d2f2a5', "aria-checked": indeterminate ? 'mixed' : `${checked}`, class: createColorClasses$1(color, {
|
|
8516
8517
|
[mode]: true,
|
|
8517
8518
|
'in-item': hostContext('ion-item', el),
|
|
8518
8519
|
'checkbox-checked': checked,
|
|
@@ -8522,10 +8523,10 @@ class Checkbox {
|
|
|
8522
8523
|
[`checkbox-justify-${justify}`]: justify !== undefined,
|
|
8523
8524
|
[`checkbox-alignment-${alignment}`]: alignment !== undefined,
|
|
8524
8525
|
[`checkbox-label-placement-${labelPlacement}`]: true,
|
|
8525
|
-
}), onClick: this.onClick }, hAsync("label", { key: '
|
|
8526
|
+
}), onClick: this.onClick }, hAsync("label", { key: '3439d546e8b60187421db698eab63a0bdd31c973', class: "checkbox-wrapper" }, hAsync("input", Object.assign({ key: '9f45cf7dbdedcf01ec132c11e16979adb1aa102f', 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)), hAsync("div", { key: '4e882f98939cc4b7c7ab7459c751d3f4bb2023fe', class: {
|
|
8526
8527
|
'label-text-wrapper': true,
|
|
8527
8528
|
'label-text-wrapper-hidden': el.textContent === '',
|
|
8528
|
-
}, part: "label" }, hAsync("slot", { key: '
|
|
8529
|
+
}, part: "label" }, hAsync("slot", { key: '0abda81297a086d02c4a56af75005547971dfcfe' })), hAsync("div", { key: '36489ea3f48a7d0ec46b77c243f9f253ef5c2b3b', class: "native-wrapper" }, hAsync("svg", { key: '4c53b52f5e93752672a34eb6f180b75fa9af9046', class: "checkbox-icon", viewBox: "0 0 24 24", part: "container" }, path)))));
|
|
8529
8530
|
}
|
|
8530
8531
|
getSVGPath(mode, indeterminate) {
|
|
8531
8532
|
let path = indeterminate ? (hAsync("path", { d: "M6 12L18 12", part: "mark" })) : (hAsync("path", { d: "M5.9,12.5l3.8,3.8l8.8-8.8", part: "mark" }));
|
|
@@ -8552,6 +8553,7 @@ class Checkbox {
|
|
|
8552
8553
|
"labelPlacement": [1, "label-placement"],
|
|
8553
8554
|
"justify": [1],
|
|
8554
8555
|
"alignment": [1],
|
|
8556
|
+
"required": [4],
|
|
8555
8557
|
"setFocus": [64]
|
|
8556
8558
|
},
|
|
8557
8559
|
"$listeners$": undefined,
|
|
@@ -24794,6 +24796,7 @@ class RadioGroup {
|
|
|
24794
24796
|
this.allowEmptySelection = false;
|
|
24795
24797
|
this.compareWith = undefined;
|
|
24796
24798
|
this.name = this.inputId;
|
|
24799
|
+
this.required = false;
|
|
24797
24800
|
this.value = undefined;
|
|
24798
24801
|
}
|
|
24799
24802
|
valueChanged(value) {
|
|
@@ -24894,10 +24897,10 @@ class RadioGroup {
|
|
|
24894
24897
|
radioToFocus === null || radioToFocus === void 0 ? void 0 : radioToFocus.setFocus();
|
|
24895
24898
|
}
|
|
24896
24899
|
render() {
|
|
24897
|
-
const { label, labelId, el, name, value } = this;
|
|
24900
|
+
const { label, labelId, el, name, value, required } = this;
|
|
24898
24901
|
const mode = getIonMode$1(this);
|
|
24899
24902
|
renderHiddenInput(true, el, name, value, false);
|
|
24900
|
-
return hAsync(Host, { key: '
|
|
24903
|
+
return hAsync(Host, { key: '1b86c9ba343929ffd5579dd5d1c18ca616b2e9aa', role: "radiogroup", "aria-labelledby": label ? labelId : null, onClick: this.onClick, class: mode, "aria-required": `${required}` });
|
|
24901
24904
|
}
|
|
24902
24905
|
get el() { return getElement(this); }
|
|
24903
24906
|
static get watchers() { return {
|
|
@@ -24910,6 +24913,7 @@ class RadioGroup {
|
|
|
24910
24913
|
"allowEmptySelection": [4, "allow-empty-selection"],
|
|
24911
24914
|
"compareWith": [1, "compare-with"],
|
|
24912
24915
|
"name": [1],
|
|
24916
|
+
"required": [4],
|
|
24913
24917
|
"value": [1032],
|
|
24914
24918
|
"setFocus": [64]
|
|
24915
24919
|
},
|
|
@@ -29667,6 +29671,7 @@ class Select {
|
|
|
29667
29671
|
this.expandedIcon = undefined;
|
|
29668
29672
|
this.shape = undefined;
|
|
29669
29673
|
this.value = undefined;
|
|
29674
|
+
this.required = false;
|
|
29670
29675
|
}
|
|
29671
29676
|
styleChanged() {
|
|
29672
29677
|
this.emitStyle();
|
|
@@ -30151,8 +30156,8 @@ class Select {
|
|
|
30151
30156
|
return renderedLabel;
|
|
30152
30157
|
}
|
|
30153
30158
|
renderListbox() {
|
|
30154
|
-
const { disabled, inputId, isExpanded } = this;
|
|
30155
|
-
return (hAsync("button", { disabled: disabled, id: inputId, "aria-label": this.ariaLabel, "aria-haspopup": "dialog", "aria-expanded": `${isExpanded}`, onFocus: this.onFocus, onBlur: this.onBlur, ref: (focusEl) => (this.focusEl = focusEl) }));
|
|
30159
|
+
const { disabled, inputId, isExpanded, required } = this;
|
|
30160
|
+
return (hAsync("button", { disabled: disabled, id: inputId, "aria-label": this.ariaLabel, "aria-haspopup": "dialog", "aria-expanded": `${isExpanded}`, "aria-required": `${required}`, onFocus: this.onFocus, onBlur: this.onBlur, ref: (focusEl) => (this.focusEl = focusEl) }));
|
|
30156
30161
|
}
|
|
30157
30162
|
render() {
|
|
30158
30163
|
const { disabled, el, isExpanded, expandedIcon, labelPlacement, justify, placeholder, fill, shape, name, value } = this;
|
|
@@ -30183,7 +30188,7 @@ class Select {
|
|
|
30183
30188
|
* TODO(FW-5592): Remove hasStartEndSlots condition
|
|
30184
30189
|
*/
|
|
30185
30190
|
const labelShouldFloat = labelPlacement === 'stacked' || (labelPlacement === 'floating' && (hasValue || isExpanded || hasStartEndSlots));
|
|
30186
|
-
return (hAsync(Host, { key: '
|
|
30191
|
+
return (hAsync(Host, { key: '491cf1b0e3aa31e7c9cfad3e87d83eb54272312a', onClick: this.onClick, class: createColorClasses$1(this.color, {
|
|
30187
30192
|
[mode]: true,
|
|
30188
30193
|
'in-item': inItem,
|
|
30189
30194
|
'in-item-color': hostContext('ion-item.ion-color', el),
|
|
@@ -30199,7 +30204,7 @@ class Select {
|
|
|
30199
30204
|
[`select-justify-${justify}`]: justifyEnabled,
|
|
30200
30205
|
[`select-shape-${shape}`]: shape !== undefined,
|
|
30201
30206
|
[`select-label-placement-${labelPlacement}`]: true,
|
|
30202
|
-
}) }, hAsync("label", { key: '
|
|
30207
|
+
}) }, hAsync("label", { key: '07bf3cb57bd1121383d8c746e3ac49da38300082', class: "select-wrapper", id: "select-label" }, this.renderLabelContainer(), hAsync("div", { key: '884facd18342797576bbacc761d18d83c52762e3', class: "select-wrapper-inner" }, hAsync("slot", { key: 'c4f2a2a7a76f52db15f9a0b806017caea443c47a', name: "start" }), hAsync("div", { key: '235cf383f268cc74412722cd31e246cbd4c2abe5', class: "native-wrapper", ref: (el) => (this.nativeWrapperEl = el), part: "container" }, this.renderSelectText(), this.renderListbox()), hAsync("slot", { key: '1481302e11c494d49dfd80a7aaf743f7e851558f', name: "end" }), !hasFloatingOrStackedLabel && this.renderSelectIcon()), hasFloatingOrStackedLabel && this.renderSelectIcon(), shouldRenderHighlight && hAsync("div", { key: '8a45ea9280651695c8e5435f266c286f3e3f6a18', class: "select-highlight" }))));
|
|
30203
30208
|
}
|
|
30204
30209
|
get el() { return getElement(this); }
|
|
30205
30210
|
static get watchers() { return {
|
|
@@ -30235,6 +30240,7 @@ class Select {
|
|
|
30235
30240
|
"expandedIcon": [1, "expanded-icon"],
|
|
30236
30241
|
"shape": [1],
|
|
30237
30242
|
"value": [1032],
|
|
30243
|
+
"required": [4],
|
|
30238
30244
|
"isExpanded": [32],
|
|
30239
30245
|
"open": [64]
|
|
30240
30246
|
},
|
package/hydrate/index.mjs
CHANGED
|
@@ -8493,6 +8493,7 @@ class Checkbox {
|
|
|
8493
8493
|
this.labelPlacement = 'start';
|
|
8494
8494
|
this.justify = undefined;
|
|
8495
8495
|
this.alignment = undefined;
|
|
8496
|
+
this.required = false;
|
|
8496
8497
|
}
|
|
8497
8498
|
componentWillLoad() {
|
|
8498
8499
|
this.inheritedAttributes = Object.assign({}, inheritAriaAttributes(this.el));
|
|
@@ -8504,11 +8505,11 @@ class Checkbox {
|
|
|
8504
8505
|
}
|
|
8505
8506
|
}
|
|
8506
8507
|
render() {
|
|
8507
|
-
const { color, checked, disabled, el, getSVGPath, indeterminate, inheritedAttributes, inputId, justify, labelPlacement, name, value, alignment, } = this;
|
|
8508
|
+
const { color, checked, disabled, el, getSVGPath, indeterminate, inheritedAttributes, inputId, justify, labelPlacement, name, value, alignment, required, } = this;
|
|
8508
8509
|
const mode = getIonMode$1(this);
|
|
8509
8510
|
const path = getSVGPath(mode, indeterminate);
|
|
8510
8511
|
renderHiddenInput(true, el, name, checked ? value : '', disabled);
|
|
8511
|
-
return (hAsync(Host, { key: '
|
|
8512
|
+
return (hAsync(Host, { key: '07a5884062dd256b570e856270c74a5a09d2f2a5', "aria-checked": indeterminate ? 'mixed' : `${checked}`, class: createColorClasses$1(color, {
|
|
8512
8513
|
[mode]: true,
|
|
8513
8514
|
'in-item': hostContext('ion-item', el),
|
|
8514
8515
|
'checkbox-checked': checked,
|
|
@@ -8518,10 +8519,10 @@ class Checkbox {
|
|
|
8518
8519
|
[`checkbox-justify-${justify}`]: justify !== undefined,
|
|
8519
8520
|
[`checkbox-alignment-${alignment}`]: alignment !== undefined,
|
|
8520
8521
|
[`checkbox-label-placement-${labelPlacement}`]: true,
|
|
8521
|
-
}), onClick: this.onClick }, hAsync("label", { key: '
|
|
8522
|
+
}), onClick: this.onClick }, hAsync("label", { key: '3439d546e8b60187421db698eab63a0bdd31c973', class: "checkbox-wrapper" }, hAsync("input", Object.assign({ key: '9f45cf7dbdedcf01ec132c11e16979adb1aa102f', 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)), hAsync("div", { key: '4e882f98939cc4b7c7ab7459c751d3f4bb2023fe', class: {
|
|
8522
8523
|
'label-text-wrapper': true,
|
|
8523
8524
|
'label-text-wrapper-hidden': el.textContent === '',
|
|
8524
|
-
}, part: "label" }, hAsync("slot", { key: '
|
|
8525
|
+
}, part: "label" }, hAsync("slot", { key: '0abda81297a086d02c4a56af75005547971dfcfe' })), hAsync("div", { key: '36489ea3f48a7d0ec46b77c243f9f253ef5c2b3b', class: "native-wrapper" }, hAsync("svg", { key: '4c53b52f5e93752672a34eb6f180b75fa9af9046', class: "checkbox-icon", viewBox: "0 0 24 24", part: "container" }, path)))));
|
|
8525
8526
|
}
|
|
8526
8527
|
getSVGPath(mode, indeterminate) {
|
|
8527
8528
|
let path = indeterminate ? (hAsync("path", { d: "M6 12L18 12", part: "mark" })) : (hAsync("path", { d: "M5.9,12.5l3.8,3.8l8.8-8.8", part: "mark" }));
|
|
@@ -8548,6 +8549,7 @@ class Checkbox {
|
|
|
8548
8549
|
"labelPlacement": [1, "label-placement"],
|
|
8549
8550
|
"justify": [1],
|
|
8550
8551
|
"alignment": [1],
|
|
8552
|
+
"required": [4],
|
|
8551
8553
|
"setFocus": [64]
|
|
8552
8554
|
},
|
|
8553
8555
|
"$listeners$": undefined,
|
|
@@ -24790,6 +24792,7 @@ class RadioGroup {
|
|
|
24790
24792
|
this.allowEmptySelection = false;
|
|
24791
24793
|
this.compareWith = undefined;
|
|
24792
24794
|
this.name = this.inputId;
|
|
24795
|
+
this.required = false;
|
|
24793
24796
|
this.value = undefined;
|
|
24794
24797
|
}
|
|
24795
24798
|
valueChanged(value) {
|
|
@@ -24890,10 +24893,10 @@ class RadioGroup {
|
|
|
24890
24893
|
radioToFocus === null || radioToFocus === void 0 ? void 0 : radioToFocus.setFocus();
|
|
24891
24894
|
}
|
|
24892
24895
|
render() {
|
|
24893
|
-
const { label, labelId, el, name, value } = this;
|
|
24896
|
+
const { label, labelId, el, name, value, required } = this;
|
|
24894
24897
|
const mode = getIonMode$1(this);
|
|
24895
24898
|
renderHiddenInput(true, el, name, value, false);
|
|
24896
|
-
return hAsync(Host, { key: '
|
|
24899
|
+
return hAsync(Host, { key: '1b86c9ba343929ffd5579dd5d1c18ca616b2e9aa', role: "radiogroup", "aria-labelledby": label ? labelId : null, onClick: this.onClick, class: mode, "aria-required": `${required}` });
|
|
24897
24900
|
}
|
|
24898
24901
|
get el() { return getElement(this); }
|
|
24899
24902
|
static get watchers() { return {
|
|
@@ -24906,6 +24909,7 @@ class RadioGroup {
|
|
|
24906
24909
|
"allowEmptySelection": [4, "allow-empty-selection"],
|
|
24907
24910
|
"compareWith": [1, "compare-with"],
|
|
24908
24911
|
"name": [1],
|
|
24912
|
+
"required": [4],
|
|
24909
24913
|
"value": [1032],
|
|
24910
24914
|
"setFocus": [64]
|
|
24911
24915
|
},
|
|
@@ -29663,6 +29667,7 @@ class Select {
|
|
|
29663
29667
|
this.expandedIcon = undefined;
|
|
29664
29668
|
this.shape = undefined;
|
|
29665
29669
|
this.value = undefined;
|
|
29670
|
+
this.required = false;
|
|
29666
29671
|
}
|
|
29667
29672
|
styleChanged() {
|
|
29668
29673
|
this.emitStyle();
|
|
@@ -30147,8 +30152,8 @@ class Select {
|
|
|
30147
30152
|
return renderedLabel;
|
|
30148
30153
|
}
|
|
30149
30154
|
renderListbox() {
|
|
30150
|
-
const { disabled, inputId, isExpanded } = this;
|
|
30151
|
-
return (hAsync("button", { disabled: disabled, id: inputId, "aria-label": this.ariaLabel, "aria-haspopup": "dialog", "aria-expanded": `${isExpanded}`, onFocus: this.onFocus, onBlur: this.onBlur, ref: (focusEl) => (this.focusEl = focusEl) }));
|
|
30155
|
+
const { disabled, inputId, isExpanded, required } = this;
|
|
30156
|
+
return (hAsync("button", { disabled: disabled, id: inputId, "aria-label": this.ariaLabel, "aria-haspopup": "dialog", "aria-expanded": `${isExpanded}`, "aria-required": `${required}`, onFocus: this.onFocus, onBlur: this.onBlur, ref: (focusEl) => (this.focusEl = focusEl) }));
|
|
30152
30157
|
}
|
|
30153
30158
|
render() {
|
|
30154
30159
|
const { disabled, el, isExpanded, expandedIcon, labelPlacement, justify, placeholder, fill, shape, name, value } = this;
|
|
@@ -30179,7 +30184,7 @@ class Select {
|
|
|
30179
30184
|
* TODO(FW-5592): Remove hasStartEndSlots condition
|
|
30180
30185
|
*/
|
|
30181
30186
|
const labelShouldFloat = labelPlacement === 'stacked' || (labelPlacement === 'floating' && (hasValue || isExpanded || hasStartEndSlots));
|
|
30182
|
-
return (hAsync(Host, { key: '
|
|
30187
|
+
return (hAsync(Host, { key: '491cf1b0e3aa31e7c9cfad3e87d83eb54272312a', onClick: this.onClick, class: createColorClasses$1(this.color, {
|
|
30183
30188
|
[mode]: true,
|
|
30184
30189
|
'in-item': inItem,
|
|
30185
30190
|
'in-item-color': hostContext('ion-item.ion-color', el),
|
|
@@ -30195,7 +30200,7 @@ class Select {
|
|
|
30195
30200
|
[`select-justify-${justify}`]: justifyEnabled,
|
|
30196
30201
|
[`select-shape-${shape}`]: shape !== undefined,
|
|
30197
30202
|
[`select-label-placement-${labelPlacement}`]: true,
|
|
30198
|
-
}) }, hAsync("label", { key: '
|
|
30203
|
+
}) }, hAsync("label", { key: '07bf3cb57bd1121383d8c746e3ac49da38300082', class: "select-wrapper", id: "select-label" }, this.renderLabelContainer(), hAsync("div", { key: '884facd18342797576bbacc761d18d83c52762e3', class: "select-wrapper-inner" }, hAsync("slot", { key: 'c4f2a2a7a76f52db15f9a0b806017caea443c47a', name: "start" }), hAsync("div", { key: '235cf383f268cc74412722cd31e246cbd4c2abe5', class: "native-wrapper", ref: (el) => (this.nativeWrapperEl = el), part: "container" }, this.renderSelectText(), this.renderListbox()), hAsync("slot", { key: '1481302e11c494d49dfd80a7aaf743f7e851558f', name: "end" }), !hasFloatingOrStackedLabel && this.renderSelectIcon()), hasFloatingOrStackedLabel && this.renderSelectIcon(), shouldRenderHighlight && hAsync("div", { key: '8a45ea9280651695c8e5435f266c286f3e3f6a18', class: "select-highlight" }))));
|
|
30199
30204
|
}
|
|
30200
30205
|
get el() { return getElement(this); }
|
|
30201
30206
|
static get watchers() { return {
|
|
@@ -30231,6 +30236,7 @@ class Select {
|
|
|
30231
30236
|
"expandedIcon": [1, "expanded-icon"],
|
|
30232
30237
|
"shape": [1],
|
|
30233
30238
|
"value": [1032],
|
|
30239
|
+
"required": [4],
|
|
30234
30240
|
"isExpanded": [32],
|
|
30235
30241
|
"open": [64]
|
|
30236
30242
|
},
|
package/package.json
CHANGED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* (C) Ionic http://ionicframework.com - MIT License
|
|
3
|
-
*/
|
|
4
|
-
import{r as e,d as t,h as i,f as l,i as o,j as s}from"./p-d836d43e.js";import{c as r}from"./p-34b11c24.js";import{i as a,c as n}from"./p-de756e5c.js";import{h as c,f as d,d as p}from"./p-b51e4004.js";import{c as h,b,a as m,m as g,s as f}from"./p-28706c6f.js";import{i as u}from"./p-fb813dab.js";import{h as x,c as v,g as w}from"./p-47794def.js";import{w as k}from"./p-459d13d5.js";import{w as y,q as j}from"./p-da2b833b.js";import{b as z}from"./p-0574e87e.js";import"./p-7b30edcc.js";import"./p-ecceeb90.js";import"./p-3cc276f4.js";import"./p-9b97df10.js";import"./p-e8d56122.js";const C=class{constructor(i){e(this,i),this.ionChange=t(this,"ionChange",7),this.ionCancel=t(this,"ionCancel",7),this.ionDismiss=t(this,"ionDismiss",7),this.ionFocus=t(this,"ionFocus",7),this.ionBlur=t(this,"ionBlur",7),this.ionStyle=t(this,"ionStyle",7),this.inputId="ion-sel-"+Y++,this.inheritedAttributes={},this.onClick=e=>{const t=e.target,i=t.closest('[slot="start"], [slot="end"]');t===this.el||null===i?(this.setFocus(),this.open(e)):e.preventDefault()},this.onFocus=()=>{this.ionFocus.emit()},this.onBlur=()=>{this.ionBlur.emit()},this.isExpanded=!1,this.cancelText="Cancel",this.color=void 0,this.compareWith=void 0,this.disabled=!1,this.fill=void 0,this.interface="alert",this.interfaceOptions={},this.justify=void 0,this.label=void 0,this.labelPlacement="start",this.multiple=!1,this.name=this.inputId,this.okText="OK",this.placeholder=void 0,this.selectedText=void 0,this.toggleIcon=void 0,this.expandedIcon=void 0,this.shape=void 0,this.value=void 0}styleChanged(){this.emitStyle()}setValue(e){this.value=e,this.ionChange.emit({value:e})}async connectedCallback(){const{el:e}=this;this.notchController=r(e,(()=>this.notchSpacerEl),(()=>this.labelSlot)),this.updateOverlayOptions(),this.emitStyle(),this.mutationO=k(this.el,"ion-select-option",(async()=>{this.updateOverlayOptions(),s(this)}))}componentWillLoad(){this.inheritedAttributes=c(this.el,["aria-label"])}componentDidLoad(){this.emitStyle()}disconnectedCallback(){this.mutationO&&(this.mutationO.disconnect(),this.mutationO=void 0),this.notchController&&(this.notchController.destroy(),this.notchController=void 0)}async open(e){if(this.disabled||this.isExpanded)return;this.isExpanded=!0;const t=this.overlay=await this.createOverlay(e);if(t.onDidDismiss().then((()=>{this.overlay=void 0,this.isExpanded=!1,this.ionDismiss.emit(),this.setFocus()})),await t.present(),"popover"===this.interface||"modal"===this.interface){const e=this.childOpts.findIndex((e=>e.value===this.value));if(e>-1){const i=t.querySelector(`.select-interface-option:nth-child(${e+1})`);if(i){const e=i.querySelector("ion-radio, ion-checkbox");e&&e.setFocus(),d(i)}}else{const e=t.querySelector("ion-radio:not(.radio-disabled), ion-checkbox:not(.checkbox-disabled)");e&&(e.setFocus(),d(e.closest("ion-item")))}}return t}createOverlay(e){let t=this.interface;return"action-sheet"===t&&this.multiple&&(console.warn(`Select interface cannot be "${t}" with a multi-value select. Using the "alert" interface instead.`),t="alert"),"popover"!==t||e||(console.warn(`Select interface cannot be a "${t}" without passing an event. Using the "alert" interface instead.`),t="alert"),"action-sheet"===t?this.openActionSheet():"popover"===t?this.openPopover(e):"modal"===t?this.openModal():this.openAlert()}updateOverlayOptions(){const e=this.overlay;if(!e)return;const t=this.childOpts,i=this.value;switch(this.interface){case"action-sheet":e.buttons=this.createActionSheetButtons(t,i);break;case"popover":const l=e.querySelector("ion-select-popover");l&&(l.options=this.createOverlaySelectOptions(t,i));break;case"modal":const o=e.querySelector("ion-select-modal");o&&(o.options=this.createOverlaySelectOptions(t,i));break;case"alert":e.inputs=this.createAlertInputs(t,this.multiple?"checkbox":"radio",i)}}createActionSheetButtons(e,t){const i=e.map((e=>{const i=O(e),l=Array.from(e.classList).filter((e=>"hydrated"!==e)).join(" "),o=`${P} ${l}`;return{role:a(t,i,this.compareWith)?"selected":"",text:e.textContent,cssClass:o,handler:()=>{this.setValue(i)}}}));return i.push({text:this.cancelText,role:"cancel",handler:()=>{this.ionCancel.emit()}}),i}createAlertInputs(e,t,i){return e.map((e=>{const l=O(e),o=Array.from(e.classList).filter((e=>"hydrated"!==e)).join(" ");return{type:t,cssClass:`${P} ${o}`,label:e.textContent||"",value:l,checked:a(i,l,this.compareWith),disabled:e.disabled}}))}createOverlaySelectOptions(e,t){return e.map((e=>{const i=O(e),l=Array.from(e.classList).filter((e=>"hydrated"!==e)).join(" ");return{text:e.textContent||"",cssClass:`${P} ${l}`,value:i,checked:a(t,i,this.compareWith),disabled:e.disabled,handler:e=>{this.setValue(e),this.multiple||this.close()}}}))}async openPopover(e){const{fill:t,labelPlacement:i}=this,l=this.interfaceOptions,o=z(this),s="md"!==o,r=this.multiple,a=this.value;let n=e,c="auto";"floating"===i||"stacked"===i||"md"===o&&void 0!==t?c="cover":n=Object.assign(Object.assign({},e),{detail:{ionShadowTarget:this.nativeWrapperEl}});const d=Object.assign(Object.assign({mode:o,event:n,alignment:"center",size:c,showBackdrop:s},l),{component:"ion-select-popover",cssClass:["select-popover",l.cssClass],componentProps:{header:l.header,subHeader:l.subHeader,message:l.message,multiple:r,value:a,options:this.createOverlaySelectOptions(this.childOpts,a)}});return h.create(d)}async openActionSheet(){const e=z(this),t=this.interfaceOptions,i=Object.assign(Object.assign({mode:e},t),{buttons:this.createActionSheetButtons(this.childOpts,this.value),cssClass:["select-action-sheet",t.cssClass]});return b.create(i)}async openAlert(){const e=this.interfaceOptions,t=this.multiple?"checkbox":"radio",i=z(this),l=Object.assign(Object.assign({mode:i},e),{header:e.header?e.header:this.labelText,inputs:this.createAlertInputs(this.childOpts,t,this.value),buttons:[{text:this.cancelText,role:"cancel",handler:()=>{this.ionCancel.emit()}},{text:this.okText,handler:e=>{this.setValue(e)}}],cssClass:["select-alert",e.cssClass,this.multiple?"multiple-select-alert":"single-select-alert"]});return m.create(l)}openModal(){const{multiple:e,value:t,interfaceOptions:i}=this,l=z(this),o=Object.assign(Object.assign({},i),{mode:l,cssClass:["select-modal",i.cssClass],component:"ion-select-modal",componentProps:{header:i.header,multiple:e,value:t,options:this.createOverlaySelectOptions(this.childOpts,t)}});return g.create(o)}close(){return this.overlay?this.overlay.dismiss():Promise.resolve(!1)}hasValue(){return""!==this.getText()}get childOpts(){return Array.from(this.el.querySelectorAll("ion-select-option"))}get labelText(){const{label:e}=this;if(void 0!==e)return e;const{labelSlot:t}=this;return null!==t?t.textContent:void 0}getText(){const e=this.selectedText;return null!=e&&""!==e?e:S(this.childOpts,this.value,this.compareWith)}setFocus(){this.focusEl&&this.focusEl.focus()}emitStyle(){const{disabled:e}=this;this.ionStyle.emit({"interactive-disabled":e})}renderLabel(){const{label:e}=this;return i("div",{class:{"label-text-wrapper":!0,"label-text-wrapper-hidden":!this.hasLabel},part:"label"},void 0===e?i("slot",{name:"label"}):i("div",{class:"label-text"},e))}componentDidRender(){var e;null===(e=this.notchController)||void 0===e||e.calculateNotchWidth()}get labelSlot(){return this.el.querySelector('[slot="label"]')}get hasLabel(){return void 0!==this.label||null!==this.labelSlot}renderLabelContainer(){return"md"===z(this)&&"outline"===this.fill?[i("div",{class:"select-outline-container"},i("div",{class:"select-outline-start"}),i("div",{class:{"select-outline-notch":!0,"select-outline-notch-hidden":!this.hasLabel}},i("div",{class:"notch-spacer","aria-hidden":"true",ref:e=>this.notchSpacerEl=e},this.label)),i("div",{class:"select-outline-end"})),this.renderLabel()]:this.renderLabel()}renderSelectText(){const{placeholder:e}=this;let t=!1,l=this.getText();return""===l&&void 0!==e&&(l=e,t=!0),i("div",{"aria-hidden":"true",class:{"select-text":!0,"select-placeholder":t},part:t?"placeholder":"text"},l)}renderSelectIcon(){const e=z(this),{isExpanded:t,toggleIcon:l,expandedIcon:o}=this;let s;return s=t&&void 0!==o?o:null!=l?l:"ios"===e?y:j,i("ion-icon",{class:"select-icon",part:"icon","aria-hidden":"true",icon:s})}get ariaLabel(){var e;const{placeholder:t,inheritedAttributes:i}=this,l=this.getText(),o=null!==(e=i["aria-label"])&&void 0!==e?e:this.labelText;let s=l;return""===s&&void 0!==t&&(s=t),void 0!==o&&(s=""===s?o:`${o}, ${s}`),s}renderListbox(){const{disabled:e,inputId:t,isExpanded:l}=this;return i("button",{disabled:e,id:t,"aria-label":this.ariaLabel,"aria-haspopup":"dialog","aria-expanded":`${l}`,onFocus:this.onFocus,onBlur:this.onBlur,ref:e=>this.focusEl=e})}render(){const{disabled:e,el:t,isExpanded:o,expandedIcon:s,labelPlacement:r,justify:a,placeholder:n,fill:c,shape:d,name:h,value:b}=this,m=z(this),g="floating"===r||"stacked"===r,f=!g&&void 0!==a,w=u(t)?"rtl":"ltr",k=x("ion-item",this.el),y="md"===m&&"outline"!==c&&!k,j=this.hasValue(),C=null!==t.querySelector('[slot="start"], [slot="end"]');p(!0,t,h,$(b),e);const O="stacked"===r||"floating"===r&&(j||o||C);return i(l,{key:"144dfa5c49549a74fe516c65b9b8104a477ac789",onClick:this.onClick,class:v(this.color,{[m]:!0,"in-item":k,"in-item-color":x("ion-item.ion-color",t),"select-disabled":e,"select-expanded":o,"has-expanded-icon":void 0!==s,"has-value":j,"label-floating":O,"has-placeholder":void 0!==n,"ion-focusable":!0,[`select-${w}`]:!0,[`select-fill-${c}`]:void 0!==c,[`select-justify-${a}`]:f,[`select-shape-${d}`]:void 0!==d,[`select-label-placement-${r}`]:!0})},i("label",{key:"0edcfcbac575a9dccc77991531b6980d1caebf42",class:"select-wrapper",id:"select-label"},this.renderLabelContainer(),i("div",{key:"348151d90cb093f5d21c7d4a834264ac4a312c40",class:"select-wrapper-inner"},i("slot",{key:"8b7708c7f81217435c58276da0c08bba766d9500",name:"start"}),i("div",{key:"10c520a335da0a0d1cf40f9365597beb244d3b48",class:"native-wrapper",ref:e=>this.nativeWrapperEl=e,part:"container"},this.renderSelectText(),this.renderListbox()),i("slot",{key:"0f15c40a5495e98e29d2a21ba21e0bc6f1c0125a",name:"end"}),!g&&this.renderSelectIcon()),g&&this.renderSelectIcon(),y&&i("div",{key:"c87faad2e5ebf7f9453397d7ede43abd64d21294",class:"select-highlight"})))}get el(){return o(this)}static get watchers(){return{disabled:["styleChanged"],isExpanded:["styleChanged"],placeholder:["styleChanged"],value:["styleChanged"]}}},O=e=>{const t=e.value;return void 0===t?e.textContent||"":t},$=e=>{if(null!=e)return Array.isArray(e)?e.join(","):e.toString()},S=(e,t,i)=>void 0===t?"":Array.isArray(t)?t.map((t=>A(e,t,i))).filter((e=>null!==e)).join(", "):A(e,t,i)||"",A=(e,t,i)=>{const l=e.find((e=>n(t,O(e),i)));return l?l.textContent:null};let Y=0;const P="select-interface-option";C.style={ios:":host{--padding-top:0px;--padding-end:0px;--padding-bottom:0px;--padding-start:0px;--placeholder-color:currentColor;--placeholder-opacity:var(--ion-placeholder-opacity, 0.6);--background:transparent;--border-style:solid;--highlight-color-focused:var(--ion-color-primary, #0054e9);--highlight-color-valid:var(--ion-color-success, #2dd55b);--highlight-color-invalid:var(--ion-color-danger, #c5000f);--highlight-color:var(--highlight-color-focused);display:block;position:relative;width:100%;min-height:44px;font-family:var(--ion-font-family, inherit);white-space:nowrap;cursor:pointer;z-index:2}:host(.select-label-placement-floating),:host(.select-label-placement-stacked){min-height:56px}:host(.ion-color){--highlight-color-focused:var(--ion-color-base)}:host(.in-item){-ms-flex:1 1 0px;flex:1 1 0}:host(.select-disabled){pointer-events:none}:host(.ion-focused) button{border:2px solid #5e9ed6}:host([slot=start]),:host([slot=end]){-ms-flex:initial;flex:initial;width:auto}.select-placeholder{color:var(--placeholder-color);opacity:var(--placeholder-opacity)}button{position:absolute;top:0;left:0;right:0;bottom:0;width:100%;height:100%;margin:0;padding:0;border:0;outline:0;clip:rect(0 0 0 0);opacity:0;overflow:hidden;-webkit-appearance:none;-moz-appearance:none}.select-icon{-webkit-margin-start:4px;margin-inline-start:4px;-webkit-margin-end:0;margin-inline-end:0;margin-top:0;margin-bottom:0;position:relative;-ms-flex-negative:0;flex-shrink:0}:host(.in-item-color) .select-icon{color:inherit}:host(.select-label-placement-stacked) .select-icon,:host(.select-label-placement-floating) .select-icon{position:absolute;height:100%}:host(.select-ltr.select-label-placement-stacked) .select-icon,:host(.select-ltr.select-label-placement-floating) .select-icon{right:var(--padding-end, 0)}:host(.select-rtl.select-label-placement-stacked) .select-icon,:host(.select-rtl.select-label-placement-floating) .select-icon{left:var(--padding-start, 0)}.select-text{-ms-flex:1;flex:1;min-width:16px;font-size:inherit;text-overflow:ellipsis;white-space:inherit;overflow:hidden}.select-wrapper{-webkit-padding-start:var(--padding-start);padding-inline-start:var(--padding-start);-webkit-padding-end:var(--padding-end);padding-inline-end:var(--padding-end);padding-top:var(--padding-top);padding-bottom:var(--padding-bottom);border-radius:var(--border-radius);display:-ms-flexbox;display:flex;position:relative;-ms-flex-positive:1;flex-grow:1;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between;height:inherit;min-height:inherit;-webkit-transition:background-color 15ms linear;transition:background-color 15ms linear;background:var(--background);line-height:normal;cursor:inherit;-webkit-box-sizing:border-box;box-sizing:border-box}.select-wrapper .select-placeholder{-webkit-transition:opacity 150ms cubic-bezier(0.4, 0, 0.2, 1);transition:opacity 150ms cubic-bezier(0.4, 0, 0.2, 1)}.select-wrapper-inner{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;overflow:hidden}:host(.select-label-placement-stacked) .select-wrapper-inner,:host(.select-label-placement-floating) .select-wrapper-inner{-ms-flex-positive:1;flex-grow:1}:host(.ion-touched.ion-invalid){--highlight-color:var(--highlight-color-invalid)}:host(.ion-valid){--highlight-color:var(--highlight-color-valid)}.label-text-wrapper{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;max-width:200px;-webkit-transition:color 150ms cubic-bezier(0.4, 0, 0.2, 1), -webkit-transform 150ms cubic-bezier(0.4, 0, 0.2, 1);transition:color 150ms cubic-bezier(0.4, 0, 0.2, 1), -webkit-transform 150ms cubic-bezier(0.4, 0, 0.2, 1);transition:color 150ms cubic-bezier(0.4, 0, 0.2, 1), transform 150ms cubic-bezier(0.4, 0, 0.2, 1);transition:color 150ms cubic-bezier(0.4, 0, 0.2, 1), transform 150ms cubic-bezier(0.4, 0, 0.2, 1), -webkit-transform 150ms cubic-bezier(0.4, 0, 0.2, 1);pointer-events:none}.label-text,::slotted([slot=label]){text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.label-text-wrapper-hidden,.select-outline-notch-hidden{display:none}.native-wrapper{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-webkit-transition:opacity 150ms cubic-bezier(0.4, 0, 0.2, 1);transition:opacity 150ms cubic-bezier(0.4, 0, 0.2, 1);overflow:hidden}:host(.select-justify-space-between) .select-wrapper{-ms-flex-pack:justify;justify-content:space-between}:host(.select-justify-start) .select-wrapper{-ms-flex-pack:start;justify-content:start}:host(.select-justify-end) .select-wrapper{-ms-flex-pack:end;justify-content:end}:host(.select-label-placement-start) .select-wrapper{-ms-flex-direction:row;flex-direction:row}:host(.select-label-placement-start) .label-text-wrapper{-webkit-margin-start:0;margin-inline-start:0;-webkit-margin-end:16px;margin-inline-end:16px;margin-top:0;margin-bottom:0}:host(.select-label-placement-end) .select-wrapper{-ms-flex-direction:row-reverse;flex-direction:row-reverse}:host(.select-label-placement-end) .label-text-wrapper{-webkit-margin-start:16px;margin-inline-start:16px;-webkit-margin-end:0;margin-inline-end:0;margin-top:0;margin-bottom:0}:host(.select-label-placement-fixed) .label-text-wrapper{-webkit-margin-start:0;margin-inline-start:0;-webkit-margin-end:16px;margin-inline-end:16px;margin-top:0;margin-bottom:0}:host(.select-label-placement-fixed) .label-text-wrapper{-ms-flex:0 0 100px;flex:0 0 100px;width:100px;min-width:100px;max-width:200px}:host(.select-label-placement-stacked) .select-wrapper,:host(.select-label-placement-floating) .select-wrapper{-ms-flex-direction:column;flex-direction:column;-ms-flex-align:start;align-items:start}:host(.select-label-placement-stacked) .label-text-wrapper,:host(.select-label-placement-floating) .label-text-wrapper{max-width:100%}:host(.select-ltr.select-label-placement-stacked) .label-text-wrapper,:host(.select-ltr.select-label-placement-floating) .label-text-wrapper{-webkit-transform-origin:left top;transform-origin:left top}:host(.select-rtl.select-label-placement-stacked) .label-text-wrapper,:host(.select-rtl.select-label-placement-floating) .label-text-wrapper{-webkit-transform-origin:right top;transform-origin:right top}:host(.select-label-placement-stacked) .native-wrapper,:host(.select-label-placement-floating) .native-wrapper{margin-left:0;margin-right:0;margin-top:1px;margin-bottom:0;-ms-flex-positive:1;flex-grow:1;width:100%}:host(.select-label-placement-floating) .label-text-wrapper{-webkit-transform:translateY(100%) scale(1);transform:translateY(100%) scale(1)}:host(.select-label-placement-floating:not(.label-floating)) .native-wrapper .select-placeholder{opacity:0}:host(.select-expanded.select-label-placement-floating) .native-wrapper .select-placeholder,:host(.ion-focused.select-label-placement-floating) .native-wrapper .select-placeholder,:host(.has-value.select-label-placement-floating) .native-wrapper .select-placeholder{opacity:1}:host(.label-floating) .label-text-wrapper{-webkit-transform:translateY(50%) scale(0.75);transform:translateY(50%) scale(0.75);max-width:calc(100% / 0.75)}::slotted([slot=start]),::slotted([slot=end]){-ms-flex-negative:0;flex-shrink:0}::slotted([slot=start]:last-of-type){-webkit-margin-end:16px;margin-inline-end:16px;-webkit-margin-start:0;margin-inline-start:0}::slotted([slot=end]:first-of-type){-webkit-margin-start:16px;margin-inline-start:16px;-webkit-margin-end:0;margin-inline-end:0}:host{--highlight-height:0px}.select-icon{width:1.125rem;height:1.125rem;color:var(--ion-color-step-650, var(--ion-text-color-step-350, #595959))}:host(.select-label-placement-stacked) .select-wrapper-inner,:host(.select-label-placement-floating) .select-wrapper-inner{width:calc(100% - 1.125rem - 4px)}:host(.select-disabled){opacity:0.3}::slotted(ion-button[slot=start].button-has-icon-only),::slotted(ion-button[slot=end].button-has-icon-only){--border-radius:50%;--padding-start:0;--padding-end:0;--padding-top:0;--padding-bottom:0;aspect-ratio:1}",md:":host{--padding-top:0px;--padding-end:0px;--padding-bottom:0px;--padding-start:0px;--placeholder-color:currentColor;--placeholder-opacity:var(--ion-placeholder-opacity, 0.6);--background:transparent;--border-style:solid;--highlight-color-focused:var(--ion-color-primary, #0054e9);--highlight-color-valid:var(--ion-color-success, #2dd55b);--highlight-color-invalid:var(--ion-color-danger, #c5000f);--highlight-color:var(--highlight-color-focused);display:block;position:relative;width:100%;min-height:44px;font-family:var(--ion-font-family, inherit);white-space:nowrap;cursor:pointer;z-index:2}:host(.select-label-placement-floating),:host(.select-label-placement-stacked){min-height:56px}:host(.ion-color){--highlight-color-focused:var(--ion-color-base)}:host(.in-item){-ms-flex:1 1 0px;flex:1 1 0}:host(.select-disabled){pointer-events:none}:host(.ion-focused) button{border:2px solid #5e9ed6}:host([slot=start]),:host([slot=end]){-ms-flex:initial;flex:initial;width:auto}.select-placeholder{color:var(--placeholder-color);opacity:var(--placeholder-opacity)}button{position:absolute;top:0;left:0;right:0;bottom:0;width:100%;height:100%;margin:0;padding:0;border:0;outline:0;clip:rect(0 0 0 0);opacity:0;overflow:hidden;-webkit-appearance:none;-moz-appearance:none}.select-icon{-webkit-margin-start:4px;margin-inline-start:4px;-webkit-margin-end:0;margin-inline-end:0;margin-top:0;margin-bottom:0;position:relative;-ms-flex-negative:0;flex-shrink:0}:host(.in-item-color) .select-icon{color:inherit}:host(.select-label-placement-stacked) .select-icon,:host(.select-label-placement-floating) .select-icon{position:absolute;height:100%}:host(.select-ltr.select-label-placement-stacked) .select-icon,:host(.select-ltr.select-label-placement-floating) .select-icon{right:var(--padding-end, 0)}:host(.select-rtl.select-label-placement-stacked) .select-icon,:host(.select-rtl.select-label-placement-floating) .select-icon{left:var(--padding-start, 0)}.select-text{-ms-flex:1;flex:1;min-width:16px;font-size:inherit;text-overflow:ellipsis;white-space:inherit;overflow:hidden}.select-wrapper{-webkit-padding-start:var(--padding-start);padding-inline-start:var(--padding-start);-webkit-padding-end:var(--padding-end);padding-inline-end:var(--padding-end);padding-top:var(--padding-top);padding-bottom:var(--padding-bottom);border-radius:var(--border-radius);display:-ms-flexbox;display:flex;position:relative;-ms-flex-positive:1;flex-grow:1;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between;height:inherit;min-height:inherit;-webkit-transition:background-color 15ms linear;transition:background-color 15ms linear;background:var(--background);line-height:normal;cursor:inherit;-webkit-box-sizing:border-box;box-sizing:border-box}.select-wrapper .select-placeholder{-webkit-transition:opacity 150ms cubic-bezier(0.4, 0, 0.2, 1);transition:opacity 150ms cubic-bezier(0.4, 0, 0.2, 1)}.select-wrapper-inner{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;overflow:hidden}:host(.select-label-placement-stacked) .select-wrapper-inner,:host(.select-label-placement-floating) .select-wrapper-inner{-ms-flex-positive:1;flex-grow:1}:host(.ion-touched.ion-invalid){--highlight-color:var(--highlight-color-invalid)}:host(.ion-valid){--highlight-color:var(--highlight-color-valid)}.label-text-wrapper{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;max-width:200px;-webkit-transition:color 150ms cubic-bezier(0.4, 0, 0.2, 1), -webkit-transform 150ms cubic-bezier(0.4, 0, 0.2, 1);transition:color 150ms cubic-bezier(0.4, 0, 0.2, 1), -webkit-transform 150ms cubic-bezier(0.4, 0, 0.2, 1);transition:color 150ms cubic-bezier(0.4, 0, 0.2, 1), transform 150ms cubic-bezier(0.4, 0, 0.2, 1);transition:color 150ms cubic-bezier(0.4, 0, 0.2, 1), transform 150ms cubic-bezier(0.4, 0, 0.2, 1), -webkit-transform 150ms cubic-bezier(0.4, 0, 0.2, 1);pointer-events:none}.label-text,::slotted([slot=label]){text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.label-text-wrapper-hidden,.select-outline-notch-hidden{display:none}.native-wrapper{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-webkit-transition:opacity 150ms cubic-bezier(0.4, 0, 0.2, 1);transition:opacity 150ms cubic-bezier(0.4, 0, 0.2, 1);overflow:hidden}:host(.select-justify-space-between) .select-wrapper{-ms-flex-pack:justify;justify-content:space-between}:host(.select-justify-start) .select-wrapper{-ms-flex-pack:start;justify-content:start}:host(.select-justify-end) .select-wrapper{-ms-flex-pack:end;justify-content:end}:host(.select-label-placement-start) .select-wrapper{-ms-flex-direction:row;flex-direction:row}:host(.select-label-placement-start) .label-text-wrapper{-webkit-margin-start:0;margin-inline-start:0;-webkit-margin-end:16px;margin-inline-end:16px;margin-top:0;margin-bottom:0}:host(.select-label-placement-end) .select-wrapper{-ms-flex-direction:row-reverse;flex-direction:row-reverse}:host(.select-label-placement-end) .label-text-wrapper{-webkit-margin-start:16px;margin-inline-start:16px;-webkit-margin-end:0;margin-inline-end:0;margin-top:0;margin-bottom:0}:host(.select-label-placement-fixed) .label-text-wrapper{-webkit-margin-start:0;margin-inline-start:0;-webkit-margin-end:16px;margin-inline-end:16px;margin-top:0;margin-bottom:0}:host(.select-label-placement-fixed) .label-text-wrapper{-ms-flex:0 0 100px;flex:0 0 100px;width:100px;min-width:100px;max-width:200px}:host(.select-label-placement-stacked) .select-wrapper,:host(.select-label-placement-floating) .select-wrapper{-ms-flex-direction:column;flex-direction:column;-ms-flex-align:start;align-items:start}:host(.select-label-placement-stacked) .label-text-wrapper,:host(.select-label-placement-floating) .label-text-wrapper{max-width:100%}:host(.select-ltr.select-label-placement-stacked) .label-text-wrapper,:host(.select-ltr.select-label-placement-floating) .label-text-wrapper{-webkit-transform-origin:left top;transform-origin:left top}:host(.select-rtl.select-label-placement-stacked) .label-text-wrapper,:host(.select-rtl.select-label-placement-floating) .label-text-wrapper{-webkit-transform-origin:right top;transform-origin:right top}:host(.select-label-placement-stacked) .native-wrapper,:host(.select-label-placement-floating) .native-wrapper{margin-left:0;margin-right:0;margin-top:1px;margin-bottom:0;-ms-flex-positive:1;flex-grow:1;width:100%}:host(.select-label-placement-floating) .label-text-wrapper{-webkit-transform:translateY(100%) scale(1);transform:translateY(100%) scale(1)}:host(.select-label-placement-floating:not(.label-floating)) .native-wrapper .select-placeholder{opacity:0}:host(.select-expanded.select-label-placement-floating) .native-wrapper .select-placeholder,:host(.ion-focused.select-label-placement-floating) .native-wrapper .select-placeholder,:host(.has-value.select-label-placement-floating) .native-wrapper .select-placeholder{opacity:1}:host(.label-floating) .label-text-wrapper{-webkit-transform:translateY(50%) scale(0.75);transform:translateY(50%) scale(0.75);max-width:calc(100% / 0.75)}::slotted([slot=start]),::slotted([slot=end]){-ms-flex-negative:0;flex-shrink:0}::slotted([slot=start]:last-of-type){-webkit-margin-end:16px;margin-inline-end:16px;-webkit-margin-start:0;margin-inline-start:0}::slotted([slot=end]:first-of-type){-webkit-margin-start:16px;margin-inline-start:16px;-webkit-margin-end:0;margin-inline-end:0}:host(.select-fill-solid){--background:var(--ion-color-step-50, var(--ion-background-color-step-50, #f2f2f2));--border-color:var(--ion-color-step-500, var(--ion-background-color-step-500, gray));--border-radius:4px;--padding-start:16px;--padding-end:16px;min-height:56px}:host(.select-fill-solid) .select-wrapper{border-bottom:var(--border-width) var(--border-style) var(--border-color)}:host(.has-focus.select-fill-solid.ion-valid),:host(.select-fill-solid.ion-touched.ion-invalid){--border-color:var(--highlight-color)}:host(.select-fill-solid) .select-bottom{border-top:none}@media (any-hover: hover){:host(.select-fill-solid:hover){--background:var(--ion-color-step-100, var(--ion-background-color-step-100, #e6e6e6));--border-color:var(--ion-color-step-750, var(--ion-background-color-step-750, #404040))}}:host(.select-fill-solid.select-expanded),:host(.select-fill-solid.ion-focused){--background:var(--ion-color-step-150, var(--ion-background-color-step-150, #d9d9d9));--border-color:var(--ion-color-step-750, var(--ion-background-color-step-750, #404040))}:host(.select-fill-solid) .select-wrapper{border-start-start-radius:var(--border-radius);border-start-end-radius:var(--border-radius);border-end-end-radius:0px;border-end-start-radius:0px}:host(.label-floating.select-fill-solid) .label-text-wrapper{max-width:calc(100% / 0.75)}:host(.select-fill-outline){--border-color:var(--ion-color-step-300, var(--ion-background-color-step-300, #b3b3b3));--border-radius:4px;--padding-start:16px;--padding-end:16px;min-height:56px}:host(.select-fill-outline.select-shape-round){--border-radius:28px;--padding-start:32px;--padding-end:32px}:host(.has-focus.select-fill-outline.ion-valid),:host(.select-fill-outline.ion-touched.ion-invalid){--border-color:var(--highlight-color)}@media (any-hover: hover){:host(.select-fill-outline:hover){--border-color:var(--ion-color-step-750, var(--ion-background-color-step-750, #404040))}}:host(.select-fill-outline.select-expanded),:host(.select-fill-outline.ion-focused){--border-width:var(--highlight-height);--border-color:var(--highlight-color)}:host(.select-fill-outline) .select-bottom{border-top:none}:host(.select-fill-outline) .select-wrapper{border-bottom:none}:host(.select-ltr.select-fill-outline.select-label-placement-stacked) .label-text-wrapper,:host(.select-ltr.select-fill-outline.select-label-placement-floating) .label-text-wrapper{-webkit-transform-origin:left top;transform-origin:left top}:host(.select-rtl.select-fill-outline.select-label-placement-stacked) .label-text-wrapper,:host(.select-rtl.select-fill-outline.select-label-placement-floating) .label-text-wrapper{-webkit-transform-origin:right top;transform-origin:right top}:host(.select-fill-outline.select-label-placement-stacked) .label-text-wrapper,:host(.select-fill-outline.select-label-placement-floating) .label-text-wrapper{position:absolute;max-width:calc(100% - var(--padding-start) - var(--padding-end))}:host(.select-fill-outline) .label-text-wrapper{position:relative;z-index:1}:host(.label-floating.select-fill-outline) .label-text-wrapper{-webkit-transform:translateY(-32%) scale(0.75);transform:translateY(-32%) scale(0.75);margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;max-width:calc((100% - var(--padding-start) - var(--padding-end) - 8px) / 0.75)}:host(.select-fill-outline.select-label-placement-stacked) select,:host(.select-fill-outline.select-label-placement-floating) select{margin-left:0;margin-right:0;margin-top:6px;margin-bottom:6px}:host(.select-fill-outline) .select-outline-container{left:0;right:0;top:0;bottom:0;display:-ms-flexbox;display:flex;position:absolute;width:100%;height:100%}:host(.select-fill-outline) .select-outline-start,:host(.select-fill-outline) .select-outline-end{pointer-events:none}:host(.select-fill-outline) .select-outline-start,:host(.select-fill-outline) .select-outline-notch,:host(.select-fill-outline) .select-outline-end{border-top:var(--border-width) var(--border-style) var(--border-color);border-bottom:var(--border-width) var(--border-style) var(--border-color);-webkit-box-sizing:border-box;box-sizing:border-box}:host(.select-fill-outline) .select-outline-notch{max-width:calc(100% - var(--padding-start) - var(--padding-end))}:host(.select-fill-outline) .notch-spacer{-webkit-padding-end:8px;padding-inline-end:8px;font-size:calc(1em * 0.75);opacity:0;pointer-events:none}:host(.select-fill-outline) .select-outline-start{-webkit-border-start:var(--border-width) var(--border-style) var(--border-color);border-inline-start:var(--border-width) var(--border-style) var(--border-color)}:host(.select-fill-outline) .select-outline-start{border-start-start-radius:var(--border-radius);border-start-end-radius:0px;border-end-end-radius:0px;border-end-start-radius:var(--border-radius)}:host(.select-fill-outline) .select-outline-start{width:calc(var(--padding-start) - 4px)}:host(.select-fill-outline) .select-outline-end{-webkit-border-end:var(--border-width) var(--border-style) var(--border-color);border-inline-end:var(--border-width) var(--border-style) var(--border-color)}:host(.select-fill-outline) .select-outline-end{border-start-start-radius:0px;border-start-end-radius:var(--border-radius);border-end-end-radius:var(--border-radius);border-end-start-radius:0px}:host(.select-fill-outline) .select-outline-end{-ms-flex-positive:1;flex-grow:1}:host(.label-floating.select-fill-outline) .select-outline-notch{border-top:none}:host{--border-width:1px;--border-color:var(--ion-item-border-color, var(--ion-border-color, var(--ion-color-step-150, var(--ion-background-color-step-150, rgba(0, 0, 0, 0.13)))));--highlight-height:2px}.select-icon{width:0.8125rem;-webkit-transition:-webkit-transform 0.15s cubic-bezier(0.4, 0, 0.2, 1);transition:-webkit-transform 0.15s cubic-bezier(0.4, 0, 0.2, 1);transition:transform 0.15s cubic-bezier(0.4, 0, 0.2, 1);transition:transform 0.15s cubic-bezier(0.4, 0, 0.2, 1), -webkit-transform 0.15s cubic-bezier(0.4, 0, 0.2, 1);color:var(--ion-color-step-500, var(--ion-text-color-step-500, gray))}:host(.select-label-placement-floating.select-expanded) .label-text-wrapper,:host(.select-label-placement-floating.ion-focused) .label-text-wrapper,:host(.select-label-placement-stacked.select-expanded) .label-text-wrapper,:host(.select-label-placement-stacked.ion-focused) .label-text-wrapper{color:var(--highlight-color)}:host(.has-focus.select-label-placement-floating.ion-valid) .label-text-wrapper,:host(.select-label-placement-floating.ion-touched.ion-invalid) .label-text-wrapper,:host(.has-focus.select-label-placement-stacked.ion-valid) .label-text-wrapper,:host(.select-label-placement-stacked.ion-touched.ion-invalid) .label-text-wrapper{color:var(--highlight-color)}.select-highlight{bottom:-1px;position:absolute;width:100%;height:var(--highlight-height);-webkit-transform:scale(0);transform:scale(0);-webkit-transition:-webkit-transform 200ms;transition:-webkit-transform 200ms;transition:transform 200ms;transition:transform 200ms, -webkit-transform 200ms;background:var(--highlight-color)}.select-highlight{inset-inline-start:0}:host(.select-expanded) .select-highlight,:host(.ion-focused) .select-highlight{-webkit-transform:scale(1);transform:scale(1)}:host(.in-item) .select-highlight{bottom:0}:host(.in-item) .select-highlight{inset-inline-start:0}:host(.select-expanded:not(.has-expanded-icon)) .select-icon{-webkit-transform:rotate(180deg);transform:rotate(180deg)}:host(.select-expanded) .select-wrapper .select-icon,:host(.has-focus.ion-valid) .select-wrapper .select-icon,:host(.ion-touched.ion-invalid) .select-wrapper .select-icon,:host(.ion-focused) .select-wrapper .select-icon{color:var(--highlight-color)}:host(.select-shape-round){--border-radius:16px}:host(.select-label-placement-stacked) .select-wrapper-inner,:host(.select-label-placement-floating) .select-wrapper-inner{width:calc(100% - 0.8125rem - 4px)}:host(.select-disabled){opacity:0.38}::slotted(ion-button[slot=start].button-has-icon-only),::slotted(ion-button[slot=end].button-has-icon-only){--border-radius:50%;--padding-start:8px;--padding-end:8px;--padding-top:8px;--padding-bottom:8px;aspect-ratio:1;min-height:40px}"};const I=class{constructor(t){e(this,t),this.inputId="ion-selopt-"+L++,this.disabled=!1,this.value=void 0}render(){return i(l,{key:"2e6fa159464f04f6d8720f960141f67918bc7534",role:"option",id:this.inputId,class:z(this)})}get el(){return o(this)}};let L=0;I.style=":host{display:none}";const E=class{constructor(t){e(this,t),this.header=void 0,this.subHeader=void 0,this.message=void 0,this.multiple=void 0,this.options=[]}findOptionFromEvent(e){const{options:t}=this;return t.find((t=>t.value===e.target.value))}callOptionHandler(e){const t=this.findOptionFromEvent(e),i=this.getValues(e);(null==t?void 0:t.handler)&&f(t.handler,i)}dismissParentPopover(){const e=this.el.closest("ion-popover");e&&e.dismiss()}setChecked(e){const{multiple:t}=this,i=this.findOptionFromEvent(e);t&&i&&(i.checked=e.detail.checked)}getValues(e){const{multiple:t,options:i}=this;if(t)return i.filter((e=>e.checked)).map((e=>e.value));const l=this.findOptionFromEvent(e);return l?l.value:void 0}renderOptions(e){const{multiple:t}=this;return!0===t?this.renderCheckboxOptions(e):this.renderRadioOptions(e)}renderCheckboxOptions(e){return e.map((e=>i("ion-item",{class:Object.assign({"item-checkbox-checked":e.checked},w(e.cssClass))},i("ion-checkbox",{value:e.value,disabled:e.disabled,checked:e.checked,justify:"start",labelPlacement:"end",onIonChange:e=>{this.setChecked(e),this.callOptionHandler(e),s(this)}},e.text))))}renderRadioOptions(e){const t=e.filter((e=>e.checked)).map((e=>e.value))[0];return i("ion-radio-group",{value:t,onIonChange:e=>this.callOptionHandler(e)},e.map((e=>i("ion-item",{class:Object.assign({"item-radio-checked":e.value===t},w(e.cssClass))},i("ion-radio",{value:e.value,disabled:e.disabled,onClick:()=>this.dismissParentPopover(),onKeyUp:e=>{" "===e.key&&this.dismissParentPopover()}},e.text)))))}render(){const{header:e,message:t,options:o,subHeader:s}=this,r=void 0!==s||void 0!==t;return i(l,{key:"dd0990db4de4f175b176b27f35501dd1604ca400",class:z(this)},i("ion-list",{key:"cea2bc3687b8b2490a2a9ff4a1e16cd34169558e"},void 0!==e&&i("ion-list-header",{key:"194aebb53453c43f913daae45a1a3066a1708c4c"},e),r&&i("ion-item",{key:"b706b07a3c63ad8104d2db413e210c735ec1bec9"},i("ion-label",{key:"6e52b5b4cf6b04ff3dd5671d64264233de4190d5",class:"ion-text-wrap"},void 0!==s&&i("h3",{key:"6ef4440d17f5db8c96c63b9aa5073f4fe4b8ad62"},s),void 0!==t&&i("p",{key:"c7b3b76c30ecd606c0e985a0258c13d3a75756e7"},t))),this.renderOptions(o)))}get el(){return o(this)}};E.style={ios:".sc-ion-select-popover-ios-h ion-list.sc-ion-select-popover-ios{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0}ion-list-header.sc-ion-select-popover-ios,ion-label.sc-ion-select-popover-ios{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0}.sc-ion-select-popover-ios-h{overflow-y:auto}",md:".sc-ion-select-popover-md-h ion-list.sc-ion-select-popover-md{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0}ion-list-header.sc-ion-select-popover-md,ion-label.sc-ion-select-popover-md{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0}.sc-ion-select-popover-md-h{overflow-y:auto}ion-list.sc-ion-select-popover-md ion-radio.sc-ion-select-popover-md::part(container){display:none}ion-list.sc-ion-select-popover-md ion-radio.sc-ion-select-popover-md::part(label){margin-left:0;margin-right:0;margin-top:0;margin-bottom:0}ion-item.sc-ion-select-popover-md{--inner-border-width:0}.item-radio-checked.sc-ion-select-popover-md{--background:rgba(var(--ion-color-primary-rgb, 0, 84, 233), 0.08);--background-focused:var(--ion-color-primary, #0054e9);--background-focused-opacity:0.2;--background-hover:var(--ion-color-primary, #0054e9);--background-hover-opacity:0.12}.item-checkbox-checked.sc-ion-select-popover-md{--background-activated:var(--ion-item-color, var(--ion-text-color, #000));--background-focused:var(--ion-item-color, var(--ion-text-color, #000));--background-hover:var(--ion-item-color, var(--ion-text-color, #000));--color:var(--ion-color-primary, #0054e9)}"};export{C as ion_select,I as ion_select_option,E as ion_select_popover}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* (C) Ionic http://ionicframework.com - MIT License
|
|
3
|
-
*/
|
|
4
|
-
import{r as e,d as t,h as r,f as o,i as c}from"./p-d836d43e.js";import{i as a,d as i}from"./p-b51e4004.js";import{c as n,h as s}from"./p-47794def.js";import{b as l}from"./p-0574e87e.js";const h=class{constructor(r){e(this,r),this.ionChange=t(this,"ionChange",7),this.ionFocus=t(this,"ionFocus",7),this.ionBlur=t(this,"ionBlur",7),this.inputId="ion-cb-"+b++,this.inheritedAttributes={},this.setChecked=e=>{const t=this.checked=e;this.ionChange.emit({checked:t,value:this.value})},this.toggleChecked=e=>{e.preventDefault(),this.setFocus(),this.setChecked(!this.checked),this.indeterminate=!1},this.onFocus=()=>{this.ionFocus.emit()},this.onBlur=()=>{this.ionBlur.emit()},this.onClick=e=>{this.disabled||this.toggleChecked(e)},this.color=void 0,this.name=this.inputId,this.checked=!1,this.indeterminate=!1,this.disabled=!1,this.value="on",this.labelPlacement="start",this.justify=void 0,this.alignment=void 0}componentWillLoad(){this.inheritedAttributes=Object.assign({},a(this.el))}async setFocus(){this.focusEl&&this.focusEl.focus()}render(){const{color:e,checked:t,disabled:c,el:a,getSVGPath:h,indeterminate:b,inheritedAttributes:p,inputId:x,justify:d,labelPlacement:k,name:m,value:f,alignment:g}=this,w=l(this),u=h(w,b);return i(!0,a,m,t?f:"",c),r(o,{key:"6dc787e1100521d08c4900104e1a3e2f594e919f","aria-checked":b?"mixed":`${t}`,class:n(e,{[w]:!0,"in-item":s("ion-item",a),"checkbox-checked":t,"checkbox-disabled":c,"checkbox-indeterminate":b,interactive:!0,[`checkbox-justify-${d}`]:void 0!==d,[`checkbox-alignment-${g}`]:void 0!==g,[`checkbox-label-placement-${k}`]:!0}),onClick:this.onClick},r("label",{key:"68222fb736a5ec3f2e488649b0e2ce0417dcb224",class:"checkbox-wrapper"},r("input",Object.assign({key:"f12962d7e9b19c744cfdbdeccc67ae7f5d080281",type:"checkbox",checked:!!t||void 0,disabled:c,id:x,onChange:this.toggleChecked,onFocus:()=>this.onFocus(),onBlur:()=>this.onBlur(),ref:e=>this.focusEl=e},p)),r("div",{key:"c72df2699414b1e5a41a1bc267bc634f0c93dcff",class:{"label-text-wrapper":!0,"label-text-wrapper-hidden":""===a.textContent},part:"label"},r("slot",{key:"a2a80285178a7e0e3b536fc9ca26b8b444aa4307"})),r("div",{key:"c2b05e0d1fe8df5dcd72858220b5ff51ecaee4cc",class:"native-wrapper"},r("svg",{key:"ee24913fded72258ebd9713654a6dba92a18fcf7",class:"checkbox-icon",viewBox:"0 0 24 24",part:"container"},u))))}getSVGPath(e,t){let o=r("path",t?{d:"M6 12L18 12",part:"mark"}:{d:"M5.9,12.5l3.8,3.8l8.8-8.8",part:"mark"});return"md"===e&&(o=r("path",t?{d:"M2 12H22",part:"mark"}:{d:"M1.73,12.91 8.1,19.28 22.79,4.59",part:"mark"})),o}get el(){return c(this)}};let b=0;h.style={ios:":host{--checkbox-background-checked:var(--ion-color-primary, #0054e9);--border-color-checked:var(--ion-color-primary, #0054e9);--checkmark-color:var(--ion-color-primary-contrast, #fff);--transition:none;display:inline-block;position:relative;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;z-index:2}:host(.in-item){-ms-flex:1 1 0px;flex:1 1 0;width:100%;height:100%}:host([slot=start]),:host([slot=end]){-ms-flex:initial;flex:initial;width:auto}:host(.ion-color){--checkbox-background-checked:var(--ion-color-base);--border-color-checked:var(--ion-color-base);--checkmark-color:var(--ion-color-contrast)}.checkbox-wrapper{display:-ms-flexbox;display:flex;-ms-flex-positive:1;flex-grow:1;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between;height:inherit;cursor:inherit}.label-text-wrapper{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}:host(.in-item) .label-text-wrapper,:host(.in-item:not(.checkbox-label-placement-stacked):not([slot])) .native-wrapper{margin-top:10px;margin-bottom:10px}:host(.in-item.checkbox-label-placement-stacked) .label-text-wrapper{margin-top:10px;margin-bottom:16px}:host(.in-item.checkbox-label-placement-stacked) .native-wrapper{margin-bottom:10px}.label-text-wrapper-hidden{display:none}input{position:absolute;top:0;left:0;right:0;bottom:0;width:100%;height:100%;margin:0;padding:0;border:0;outline:0;clip:rect(0 0 0 0);opacity:0;overflow:hidden;-webkit-appearance:none;-moz-appearance:none}.native-wrapper{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.checkbox-icon{border-radius:var(--border-radius);position:relative;width:var(--size);height:var(--size);-webkit-transition:var(--transition);transition:var(--transition);border-width:var(--border-width);border-style:var(--border-style);border-color:var(--border-color);background:var(--checkbox-background);-webkit-box-sizing:border-box;box-sizing:border-box}.checkbox-icon path{fill:none;stroke:var(--checkmark-color);stroke-width:var(--checkmark-width);opacity:0}:host(.checkbox-justify-space-between) .checkbox-wrapper{-ms-flex-pack:justify;justify-content:space-between}:host(.checkbox-justify-start) .checkbox-wrapper{-ms-flex-pack:start;justify-content:start}:host(.checkbox-justify-end) .checkbox-wrapper{-ms-flex-pack:end;justify-content:end}:host(.checkbox-alignment-start) .checkbox-wrapper{-ms-flex-align:start;align-items:start}:host(.checkbox-alignment-center) .checkbox-wrapper{-ms-flex-align:center;align-items:center}:host(.checkbox-justify-space-between),:host(.checkbox-justify-start),:host(.checkbox-justify-end),:host(.checkbox-alignment-start),:host(.checkbox-alignment-center){display:block}:host(.checkbox-label-placement-start) .checkbox-wrapper{-ms-flex-direction:row;flex-direction:row}:host(.checkbox-label-placement-start) .label-text-wrapper{-webkit-margin-start:0;margin-inline-start:0;-webkit-margin-end:16px;margin-inline-end:16px}:host(.checkbox-label-placement-end) .checkbox-wrapper{-ms-flex-direction:row-reverse;flex-direction:row-reverse}:host(.checkbox-label-placement-end) .label-text-wrapper{-webkit-margin-start:16px;margin-inline-start:16px;-webkit-margin-end:0;margin-inline-end:0}:host(.checkbox-label-placement-fixed) .label-text-wrapper{-webkit-margin-start:0;margin-inline-start:0;-webkit-margin-end:16px;margin-inline-end:16px}:host(.checkbox-label-placement-fixed) .label-text-wrapper{-ms-flex:0 0 100px;flex:0 0 100px;width:100px;min-width:100px;max-width:200px}:host(.checkbox-label-placement-stacked) .checkbox-wrapper{-ms-flex-direction:column;flex-direction:column}:host(.checkbox-label-placement-stacked) .label-text-wrapper{-webkit-transform:scale(0.75);transform:scale(0.75);margin-left:0;margin-right:0;margin-bottom:16px;max-width:calc(100% / 0.75)}:host(.checkbox-label-placement-stacked.checkbox-alignment-start) .label-text-wrapper{-webkit-transform-origin:left top;transform-origin:left top}:host-context([dir=rtl]):host(.checkbox-label-placement-stacked.checkbox-alignment-start) .label-text-wrapper,:host-context([dir=rtl]).checkbox-label-placement-stacked.checkbox-alignment-start .label-text-wrapper{-webkit-transform-origin:right top;transform-origin:right top}@supports selector(:dir(rtl)){:host(.checkbox-label-placement-stacked.checkbox-alignment-start:dir(rtl)) .label-text-wrapper{-webkit-transform-origin:right top;transform-origin:right top}}:host(.checkbox-label-placement-stacked.checkbox-alignment-center) .label-text-wrapper{-webkit-transform-origin:center top;transform-origin:center top}:host-context([dir=rtl]):host(.checkbox-label-placement-stacked.checkbox-alignment-center) .label-text-wrapper,:host-context([dir=rtl]).checkbox-label-placement-stacked.checkbox-alignment-center .label-text-wrapper{-webkit-transform-origin:calc(100% - center) top;transform-origin:calc(100% - center) top}@supports selector(:dir(rtl)){:host(.checkbox-label-placement-stacked.checkbox-alignment-center:dir(rtl)) .label-text-wrapper{-webkit-transform-origin:calc(100% - center) top;transform-origin:calc(100% - center) top}}:host(.checkbox-checked) .checkbox-icon,:host(.checkbox-indeterminate) .checkbox-icon{border-color:var(--border-color-checked);background:var(--checkbox-background-checked)}:host(.checkbox-checked) .checkbox-icon path,:host(.checkbox-indeterminate) .checkbox-icon path{opacity:1}:host(.checkbox-disabled){pointer-events:none}:host{--border-radius:50%;--border-width:0.125rem;--border-style:solid;--border-color:rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.23);--checkbox-background:var(--ion-item-background, var(--ion-background-color, #fff));--size:min(1.375rem, 55.836px);--checkmark-width:1.5px}:host(.checkbox-disabled){opacity:0.3}",md:":host{--checkbox-background-checked:var(--ion-color-primary, #0054e9);--border-color-checked:var(--ion-color-primary, #0054e9);--checkmark-color:var(--ion-color-primary-contrast, #fff);--transition:none;display:inline-block;position:relative;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;z-index:2}:host(.in-item){-ms-flex:1 1 0px;flex:1 1 0;width:100%;height:100%}:host([slot=start]),:host([slot=end]){-ms-flex:initial;flex:initial;width:auto}:host(.ion-color){--checkbox-background-checked:var(--ion-color-base);--border-color-checked:var(--ion-color-base);--checkmark-color:var(--ion-color-contrast)}.checkbox-wrapper{display:-ms-flexbox;display:flex;-ms-flex-positive:1;flex-grow:1;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between;height:inherit;cursor:inherit}.label-text-wrapper{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}:host(.in-item) .label-text-wrapper,:host(.in-item:not(.checkbox-label-placement-stacked):not([slot])) .native-wrapper{margin-top:10px;margin-bottom:10px}:host(.in-item.checkbox-label-placement-stacked) .label-text-wrapper{margin-top:10px;margin-bottom:16px}:host(.in-item.checkbox-label-placement-stacked) .native-wrapper{margin-bottom:10px}.label-text-wrapper-hidden{display:none}input{position:absolute;top:0;left:0;right:0;bottom:0;width:100%;height:100%;margin:0;padding:0;border:0;outline:0;clip:rect(0 0 0 0);opacity:0;overflow:hidden;-webkit-appearance:none;-moz-appearance:none}.native-wrapper{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.checkbox-icon{border-radius:var(--border-radius);position:relative;width:var(--size);height:var(--size);-webkit-transition:var(--transition);transition:var(--transition);border-width:var(--border-width);border-style:var(--border-style);border-color:var(--border-color);background:var(--checkbox-background);-webkit-box-sizing:border-box;box-sizing:border-box}.checkbox-icon path{fill:none;stroke:var(--checkmark-color);stroke-width:var(--checkmark-width);opacity:0}:host(.checkbox-justify-space-between) .checkbox-wrapper{-ms-flex-pack:justify;justify-content:space-between}:host(.checkbox-justify-start) .checkbox-wrapper{-ms-flex-pack:start;justify-content:start}:host(.checkbox-justify-end) .checkbox-wrapper{-ms-flex-pack:end;justify-content:end}:host(.checkbox-alignment-start) .checkbox-wrapper{-ms-flex-align:start;align-items:start}:host(.checkbox-alignment-center) .checkbox-wrapper{-ms-flex-align:center;align-items:center}:host(.checkbox-justify-space-between),:host(.checkbox-justify-start),:host(.checkbox-justify-end),:host(.checkbox-alignment-start),:host(.checkbox-alignment-center){display:block}:host(.checkbox-label-placement-start) .checkbox-wrapper{-ms-flex-direction:row;flex-direction:row}:host(.checkbox-label-placement-start) .label-text-wrapper{-webkit-margin-start:0;margin-inline-start:0;-webkit-margin-end:16px;margin-inline-end:16px}:host(.checkbox-label-placement-end) .checkbox-wrapper{-ms-flex-direction:row-reverse;flex-direction:row-reverse}:host(.checkbox-label-placement-end) .label-text-wrapper{-webkit-margin-start:16px;margin-inline-start:16px;-webkit-margin-end:0;margin-inline-end:0}:host(.checkbox-label-placement-fixed) .label-text-wrapper{-webkit-margin-start:0;margin-inline-start:0;-webkit-margin-end:16px;margin-inline-end:16px}:host(.checkbox-label-placement-fixed) .label-text-wrapper{-ms-flex:0 0 100px;flex:0 0 100px;width:100px;min-width:100px;max-width:200px}:host(.checkbox-label-placement-stacked) .checkbox-wrapper{-ms-flex-direction:column;flex-direction:column}:host(.checkbox-label-placement-stacked) .label-text-wrapper{-webkit-transform:scale(0.75);transform:scale(0.75);margin-left:0;margin-right:0;margin-bottom:16px;max-width:calc(100% / 0.75)}:host(.checkbox-label-placement-stacked.checkbox-alignment-start) .label-text-wrapper{-webkit-transform-origin:left top;transform-origin:left top}:host-context([dir=rtl]):host(.checkbox-label-placement-stacked.checkbox-alignment-start) .label-text-wrapper,:host-context([dir=rtl]).checkbox-label-placement-stacked.checkbox-alignment-start .label-text-wrapper{-webkit-transform-origin:right top;transform-origin:right top}@supports selector(:dir(rtl)){:host(.checkbox-label-placement-stacked.checkbox-alignment-start:dir(rtl)) .label-text-wrapper{-webkit-transform-origin:right top;transform-origin:right top}}:host(.checkbox-label-placement-stacked.checkbox-alignment-center) .label-text-wrapper{-webkit-transform-origin:center top;transform-origin:center top}:host-context([dir=rtl]):host(.checkbox-label-placement-stacked.checkbox-alignment-center) .label-text-wrapper,:host-context([dir=rtl]).checkbox-label-placement-stacked.checkbox-alignment-center .label-text-wrapper{-webkit-transform-origin:calc(100% - center) top;transform-origin:calc(100% - center) top}@supports selector(:dir(rtl)){:host(.checkbox-label-placement-stacked.checkbox-alignment-center:dir(rtl)) .label-text-wrapper{-webkit-transform-origin:calc(100% - center) top;transform-origin:calc(100% - center) top}}:host(.checkbox-checked) .checkbox-icon,:host(.checkbox-indeterminate) .checkbox-icon{border-color:var(--border-color-checked);background:var(--checkbox-background-checked)}:host(.checkbox-checked) .checkbox-icon path,:host(.checkbox-indeterminate) .checkbox-icon path{opacity:1}:host(.checkbox-disabled){pointer-events:none}:host{--border-radius:calc(var(--size) * .125);--border-width:2px;--border-style:solid;--border-color:rgb(var(--ion-text-color-rgb, 0, 0, 0), 0.6);--checkmark-width:3;--checkbox-background:var(--ion-item-background, var(--ion-background-color, #fff));--transition:background 180ms cubic-bezier(0.4, 0, 0.2, 1);--size:18px}.checkbox-icon path{stroke-dasharray:30;stroke-dashoffset:30}:host(.checkbox-checked) .checkbox-icon path,:host(.checkbox-indeterminate) .checkbox-icon path{stroke-dashoffset:0;-webkit-transition:stroke-dashoffset 90ms linear 90ms;transition:stroke-dashoffset 90ms linear 90ms}:host(.checkbox-disabled) .label-text-wrapper{opacity:0.38}:host(.checkbox-disabled) .native-wrapper{opacity:0.63}"};export{h as ion_checkbox}
|