@ionic/core 8.0.2-nightly.20240425 → 8.0.2-nightly.20240429
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 -3
- package/components/ion-accordion-group.js +2 -2
- package/components/ion-datetime.js +2 -2
- package/components/ion-input.js +3 -3
- package/components/ion-range.js +3 -3
- package/components/ion-searchbar.js +4 -4
- package/components/ion-segment.js +2 -2
- package/components/ion-select.js +2 -2
- package/components/ion-textarea.js +2 -2
- package/components/ion-toggle.js +3 -3
- package/components/label.js +1 -1
- package/components/picker-column.js +3 -3
- package/components/radio-group.js +1 -1
- package/css/core.css.map +1 -1
- package/css/global.bundle.css.map +1 -1
- package/css/ionic.bundle.css.map +1 -1
- package/css/palettes/high-contrast-dark.always.css.map +1 -1
- package/css/palettes/high-contrast-dark.class.css.map +1 -1
- package/css/palettes/high-contrast-dark.system.css.map +1 -1
- package/css/palettes/high-contrast.always.css.map +1 -1
- package/css/palettes/high-contrast.class.css.map +1 -1
- package/css/palettes/high-contrast.system.css.map +1 -1
- package/css/typography.css.map +1 -1
- package/dist/cjs/ion-accordion_2.cjs.entry.js +2 -2
- package/dist/cjs/ion-checkbox.cjs.entry.js +3 -3
- package/dist/cjs/ion-datetime_3.cjs.entry.js +2 -2
- package/dist/cjs/ion-input.cjs.entry.js +3 -3
- package/dist/cjs/ion-item_8.cjs.entry.js +1 -1
- package/dist/cjs/ion-picker-column.cjs.entry.js +3 -3
- package/dist/cjs/ion-radio_2.cjs.entry.js +1 -1
- package/dist/cjs/ion-range.cjs.entry.js +3 -3
- package/dist/cjs/ion-searchbar.cjs.entry.js +4 -4
- package/dist/cjs/ion-segment_2.cjs.entry.js +2 -2
- package/dist/cjs/ion-select_3.cjs.entry.js +2 -2
- package/dist/cjs/ion-textarea.cjs.entry.js +2 -2
- package/dist/cjs/ion-toggle.cjs.entry.js +3 -3
- package/dist/collection/components/accordion-group/accordion-group.js +3 -3
- package/dist/collection/components/checkbox/checkbox.js +4 -4
- package/dist/collection/components/datetime/datetime.js +3 -3
- package/dist/collection/components/input/input.js +4 -4
- package/dist/collection/components/item/test/a11y/item.e2e.js +1 -4
- package/dist/collection/components/label/label.ios.css +1 -1
- package/dist/collection/components/picker-column/picker-column.js +4 -4
- package/dist/collection/components/radio-group/radio-group.js +2 -2
- package/dist/collection/components/range/range.js +4 -4
- package/dist/collection/components/searchbar/searchbar.js +5 -5
- package/dist/collection/components/segment/segment.js +3 -3
- package/dist/collection/components/select/select.js +3 -3
- package/dist/collection/components/textarea/textarea.js +3 -3
- package/dist/collection/components/toggle/toggle.js +4 -4
- package/dist/docs.json +13 -13
- package/dist/esm/ion-accordion_2.entry.js +2 -2
- package/dist/esm/ion-checkbox.entry.js +3 -3
- package/dist/esm/ion-datetime_3.entry.js +2 -2
- package/dist/esm/ion-input.entry.js +3 -3
- package/dist/esm/ion-item_8.entry.js +1 -1
- package/dist/esm/ion-picker-column.entry.js +3 -3
- package/dist/esm/ion-radio_2.entry.js +1 -1
- package/dist/esm/ion-range.entry.js +3 -3
- package/dist/esm/ion-searchbar.entry.js +4 -4
- package/dist/esm/ion-segment_2.entry.js +2 -2
- package/dist/esm/ion-select_3.entry.js +2 -2
- package/dist/esm/ion-textarea.entry.js +2 -2
- package/dist/esm/ion-toggle.entry.js +3 -3
- package/dist/esm-es5/ion-accordion_2.entry.js +1 -1
- package/dist/esm-es5/ion-checkbox.entry.js +1 -1
- package/dist/esm-es5/ion-datetime_3.entry.js +1 -1
- package/dist/esm-es5/ion-input.entry.js +1 -1
- package/dist/esm-es5/ion-item_8.entry.js +1 -1
- package/dist/esm-es5/ion-picker-column.entry.js +1 -1
- package/dist/esm-es5/ion-radio_2.entry.js +1 -1
- package/dist/esm-es5/ion-range.entry.js +1 -1
- package/dist/esm-es5/ion-searchbar.entry.js +1 -1
- package/dist/esm-es5/ion-segment_2.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-cdee3a44.system.entry.js → p-031b070b.system.entry.js} +1 -1
- package/dist/ionic/{p-4324e8a4.entry.js → p-0b3861eb.entry.js} +1 -1
- package/dist/ionic/{p-583f8865.system.entry.js → p-34619a37.system.entry.js} +1 -1
- package/dist/ionic/{p-720927ad.entry.js → p-3ef93daf.entry.js} +1 -1
- package/dist/ionic/{p-a801da4b.system.entry.js → p-45aec799.system.entry.js} +1 -1
- package/dist/ionic/p-4737e73a.entry.js +4 -0
- package/dist/ionic/{p-0d960144.system.entry.js → p-4da143c9.system.entry.js} +1 -1
- package/dist/ionic/{p-4c153abb.entry.js → p-515a47f5.entry.js} +1 -1
- package/dist/ionic/{p-0d56dea9.entry.js → p-5a6d3cd9.entry.js} +1 -1
- package/dist/ionic/{p-e49099b0.entry.js → p-6123d531.entry.js} +1 -1
- package/dist/ionic/{p-ee3bbaf2.entry.js → p-63deb2c3.entry.js} +1 -1
- package/dist/ionic/p-7536b4b3.system.js +1 -1
- package/dist/ionic/{p-8e031d97.entry.js → p-75f262d3.entry.js} +1 -1
- package/dist/ionic/{p-576786c0.system.entry.js → p-a0fa6344.system.entry.js} +1 -1
- package/dist/ionic/{p-42f00e72.system.entry.js → p-a5721afd.system.entry.js} +1 -1
- package/dist/ionic/{p-80f85095.system.entry.js → p-b17549e8.system.entry.js} +1 -1
- package/dist/ionic/{p-5d4d89e0.system.entry.js → p-b1f78948.system.entry.js} +1 -1
- package/dist/ionic/{p-70181008.entry.js → p-b4d78e71.entry.js} +1 -1
- package/dist/ionic/{p-5d3a8503.system.entry.js → p-ba9ca25a.system.entry.js} +1 -1
- package/dist/ionic/{p-3f5b86b4.entry.js → p-c687e632.entry.js} +1 -1
- package/dist/ionic/{p-49cdc4f2.entry.js → p-c977c5bc.entry.js} +1 -1
- package/dist/ionic/{p-f5c42f72.entry.js → p-d3ceed28.entry.js} +1 -1
- package/dist/ionic/{p-819e8479.system.entry.js → p-d5460f2d.system.entry.js} +1 -1
- package/dist/ionic/{p-fc94e18f.entry.js → p-d77dc6ea.entry.js} +1 -1
- package/dist/ionic/{p-1a5227b3.system.entry.js → p-ec723b9f.system.entry.js} +1 -1
- package/dist/ionic/{p-567a21a2.system.entry.js → p-f4bc5429.system.entry.js} +1 -1
- package/dist/ionic/{p-94731a92.system.entry.js → p-fc6301cd.system.entry.js} +1 -1
- package/dist/types/components/accordion-group/accordion-group.d.ts +3 -4
- package/dist/types/components/checkbox/checkbox.d.ts +3 -4
- package/dist/types/components/datetime/datetime.d.ts +2 -0
- package/dist/types/components/input/input.d.ts +2 -0
- package/dist/types/components/picker-column/picker-column.d.ts +2 -0
- package/dist/types/components/radio-group/radio-group.d.ts +2 -0
- package/dist/types/components/range/range.d.ts +1 -1
- package/dist/types/components/searchbar/searchbar.d.ts +2 -0
- package/dist/types/components/segment/segment.d.ts +3 -2
- package/dist/types/components/select/select.d.ts +2 -0
- package/dist/types/components/textarea/textarea.d.ts +2 -0
- package/dist/types/components/toggle/toggle.d.ts +3 -2
- package/dist/types/components.d.ts +12 -12
- package/hydrate/index.js +31 -31
- package/package.json +1 -1
- package/dist/ionic/p-057b5866.entry.js +0 -4
|
@@ -1758,7 +1758,7 @@ const Datetime = class {
|
|
|
1758
1758
|
const hasDatePresentation = presentation === 'date' || presentation === 'date-time' || presentation === 'time-date';
|
|
1759
1759
|
const hasWheelVariant = hasDatePresentation && preferWheel;
|
|
1760
1760
|
renderHiddenInput(true, el, name, formatValue(value), disabled);
|
|
1761
|
-
return (h(Host, { key: '
|
|
1761
|
+
return (h(Host, { key: '0b8c97bfb84dff5f8ef8097bba44f6c4ad119f76', "aria-disabled": disabled ? 'true' : null, onFocus: this.onFocus, onBlur: this.onBlur, class: Object.assign({}, createColorClasses(color, {
|
|
1762
1762
|
[mode]: true,
|
|
1763
1763
|
['datetime-readonly']: readonly,
|
|
1764
1764
|
['datetime-disabled']: disabled,
|
|
@@ -1768,7 +1768,7 @@ const Datetime = class {
|
|
|
1768
1768
|
[`datetime-size-${size}`]: true,
|
|
1769
1769
|
[`datetime-prefer-wheel`]: hasWheelVariant,
|
|
1770
1770
|
[`datetime-grid`]: isGridStyle,
|
|
1771
|
-
})) }, h("div", { key: '
|
|
1771
|
+
})) }, h("div", { key: '36e389a8c49944b5bbc0429f6b86d9c28a5b860a', class: "intersection-tracker", ref: (el) => (this.intersectionTrackerRef = el) }), this.renderDatetime(mode)));
|
|
1772
1772
|
}
|
|
1773
1773
|
get el() { return getElement(this); }
|
|
1774
1774
|
static get watchers() { return {
|
|
@@ -402,7 +402,7 @@ const Input = class {
|
|
|
402
402
|
* TODO(FW-5592): Remove hasStartEndSlots condition
|
|
403
403
|
*/
|
|
404
404
|
const labelShouldFloat = labelPlacement === 'stacked' || (labelPlacement === 'floating' && (hasValue || hasFocus || hasStartEndSlots));
|
|
405
|
-
return (h(Host, { key: '
|
|
405
|
+
return (h(Host, { key: 'b0697cdbb71e680d904c11445a9bd7c28567b0e4', class: createColorClasses(this.color, {
|
|
406
406
|
[mode]: true,
|
|
407
407
|
'has-value': hasValue,
|
|
408
408
|
'has-focus': hasFocus,
|
|
@@ -413,7 +413,7 @@ const Input = class {
|
|
|
413
413
|
'in-item': inItem,
|
|
414
414
|
'in-item-color': hostContext('ion-item.ion-color', this.el),
|
|
415
415
|
'input-disabled': disabled,
|
|
416
|
-
}) }, h("label", { key: '
|
|
416
|
+
}) }, h("label", { key: 'eb9851f62c4aa62dd3b2ebe2e169182ea9fa12d8', class: "input-wrapper", htmlFor: inputId }, this.renderLabelContainer(), h("div", { key: 'e8cd537de25d25ed7fd3a6c3450643f0bfe10f82', class: "native-wrapper" }, h("slot", { key: '00590a3d52896465102d0f9e75a9165f9a3f5936', name: "start" }), h("input", Object.assign({ key: '26fd41169cbf5c5b7efc9989d6e9300c20db321a', 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 }, this.inheritedAttributes)), this.clearInput && !readonly && !disabled && (h("button", { key: '4dc7c673179fa5c0f84a251ceed2599f8b7e9b8b', "aria-label": "reset", type: "button", class: "input-clear-icon", onPointerDown: (ev) => {
|
|
417
417
|
/**
|
|
418
418
|
* This prevents mobile browsers from
|
|
419
419
|
* blurring the input when the clear
|
|
@@ -428,7 +428,7 @@ const Input = class {
|
|
|
428
428
|
* for screen readers as it means users would be unable to swipe past the clear button.
|
|
429
429
|
*/
|
|
430
430
|
ev.stopPropagation();
|
|
431
|
-
}, onClick: this.clearTextInput }, h("ion-icon", { key: '
|
|
431
|
+
}, onClick: this.clearTextInput }, h("ion-icon", { key: '22faa709020c08c3fbd44955c2cfa77c2117e47e', "aria-hidden": "true", icon: mode === 'ios' ? closeCircle : closeSharp }))), h("slot", { key: '6b2c0138fd1aa0e8f004e807d842856278960d8a', name: "end" })), shouldRenderHighlight && h("div", { key: '2db65ebfa53b4490490d3f1dc4a1a21875e239a2', class: "input-highlight" })), this.renderBottomContent()));
|
|
432
432
|
}
|
|
433
433
|
get el() { return getElement(this); }
|
|
434
434
|
static get watchers() { return {
|
|
@@ -276,7 +276,7 @@ ItemGroup.style = {
|
|
|
276
276
|
md: IonItemGroupMdStyle0
|
|
277
277
|
};
|
|
278
278
|
|
|
279
|
-
const labelIosCss = ".item.sc-ion-label-ios-h,.item .sc-ion-label-ios-h{--color:initial;display:block;color:var(--color);font-family:var(--ion-font-family, inherit);font-size:inherit;text-overflow:ellipsis;-webkit-box-sizing:border-box;box-sizing:border-box}.ion-color.sc-ion-label-ios-h{color:var(--ion-color-base)}.ion-text-nowrap.sc-ion-label-ios-h{overflow:hidden}.item-interactive-disabled.sc-ion-label-ios-h:not(.item-multiple-inputs),.item-interactive-disabled:not(.item-multiple-inputs) .sc-ion-label-ios-h{cursor:default;opacity:0.3;pointer-events:none}.item-input.sc-ion-label-ios-h,.item-input .sc-ion-label-ios-h{-ms-flex:initial;flex:initial;max-width:200px;pointer-events:none}.item-textarea.sc-ion-label-ios-h,.item-textarea .sc-ion-label-ios-h{-ms-flex-item-align:baseline;align-self:baseline}.item-skeleton-text.sc-ion-label-ios-h,.item-skeleton-text .sc-ion-label-ios-h{overflow:hidden}.label-fixed.sc-ion-label-ios-h{-ms-flex:0 0 100px;flex:0 0 100px;width:100px;min-width:100px;max-width:200px}.label-stacked.sc-ion-label-ios-h,.label-floating.sc-ion-label-ios-h{margin-bottom:0;-ms-flex-item-align:stretch;align-self:stretch;width:auto;max-width:100%}.label-no-animate.label-floating.sc-ion-label-ios-h{-webkit-transition:none;transition:none}.sc-ion-label-ios-s h1,.sc-ion-label-ios-s h2,.sc-ion-label-ios-s h3,.sc-ion-label-ios-s h4,.sc-ion-label-ios-s h5,.sc-ion-label-ios-s h6{text-overflow:inherit;overflow:inherit}.ion-text-wrap.sc-ion-label-ios-h{font-size:0.875rem;line-height:1.5}.label-stacked.sc-ion-label-ios-h{margin-bottom:4px;font-size:0.875rem}.label-floating.sc-ion-label-ios-h{margin-bottom:0;-webkit-transform:translate(0, 29px);transform:translate(0, 29px);-webkit-transform-origin:left top;transform-origin:left top;-webkit-transition:-webkit-transform 150ms ease-in-out;transition:-webkit-transform 150ms ease-in-out;transition:transform 150ms ease-in-out;transition:transform 150ms ease-in-out, -webkit-transform 150ms ease-in-out}[dir=rtl].sc-ion-label-ios-h -no-combinator.label-floating.sc-ion-label-ios-h,[dir=rtl] .sc-ion-label-ios-h -no-combinator.label-floating.sc-ion-label-ios-h,[dir=rtl].label-floating.sc-ion-label-ios-h,[dir=rtl] .label-floating.sc-ion-label-ios-h{-webkit-transform-origin:right top;transform-origin:right top}@supports selector(:dir(rtl)){.label-floating.sc-ion-label-ios-h:dir(rtl){-webkit-transform-origin:right top;transform-origin:right top}}.item-textarea.label-floating.sc-ion-label-ios-h,.item-textarea .label-floating.sc-ion-label-ios-h{-webkit-transform:translate(0, 28px);transform:translate(0, 28px)}.item-has-focus.label-floating.sc-ion-label-ios-h,.item-has-focus .label-floating.sc-ion-label-ios-h,.item-has-placeholder.sc-ion-label-ios-h:not(.item-input).label-floating,.item-has-placeholder:not(.item-input) .label-floating.sc-ion-label-ios-h,.item-has-value.label-floating.sc-ion-label-ios-h,.item-has-value .label-floating.sc-ion-label-ios-h{-webkit-transform:scale(0.82);transform:scale(0.82)}.sc-ion-label-ios-s h1{margin-left:0;margin-right:0;margin-top:3px;margin-bottom:2px;font-size:1.375rem;font-weight:normal}.sc-ion-label-ios-s h2{margin-left:0;margin-right:0;margin-top:0;margin-bottom:2px;font-size:1.0625rem;font-weight:normal}.sc-ion-label-ios-s h3,.sc-ion-label-ios-s h4,.sc-ion-label-ios-s h5,.sc-ion-label-ios-s h6{margin-left:0;margin-right:0;margin-top:0;margin-bottom:3px;font-size:0.875rem;font-weight:normal;line-height:normal}.sc-ion-label-ios-s p{margin-left:0;margin-right:0;margin-top:0;margin-bottom:2px;font-size:0.875rem;line-height:normal;text-overflow:inherit;overflow:inherit}.sc-ion-label-ios-s>p{color:var(--ion-text-color-step-
|
|
279
|
+
const labelIosCss = ".item.sc-ion-label-ios-h,.item .sc-ion-label-ios-h{--color:initial;display:block;color:var(--color);font-family:var(--ion-font-family, inherit);font-size:inherit;text-overflow:ellipsis;-webkit-box-sizing:border-box;box-sizing:border-box}.ion-color.sc-ion-label-ios-h{color:var(--ion-color-base)}.ion-text-nowrap.sc-ion-label-ios-h{overflow:hidden}.item-interactive-disabled.sc-ion-label-ios-h:not(.item-multiple-inputs),.item-interactive-disabled:not(.item-multiple-inputs) .sc-ion-label-ios-h{cursor:default;opacity:0.3;pointer-events:none}.item-input.sc-ion-label-ios-h,.item-input .sc-ion-label-ios-h{-ms-flex:initial;flex:initial;max-width:200px;pointer-events:none}.item-textarea.sc-ion-label-ios-h,.item-textarea .sc-ion-label-ios-h{-ms-flex-item-align:baseline;align-self:baseline}.item-skeleton-text.sc-ion-label-ios-h,.item-skeleton-text .sc-ion-label-ios-h{overflow:hidden}.label-fixed.sc-ion-label-ios-h{-ms-flex:0 0 100px;flex:0 0 100px;width:100px;min-width:100px;max-width:200px}.label-stacked.sc-ion-label-ios-h,.label-floating.sc-ion-label-ios-h{margin-bottom:0;-ms-flex-item-align:stretch;align-self:stretch;width:auto;max-width:100%}.label-no-animate.label-floating.sc-ion-label-ios-h{-webkit-transition:none;transition:none}.sc-ion-label-ios-s h1,.sc-ion-label-ios-s h2,.sc-ion-label-ios-s h3,.sc-ion-label-ios-s h4,.sc-ion-label-ios-s h5,.sc-ion-label-ios-s h6{text-overflow:inherit;overflow:inherit}.ion-text-wrap.sc-ion-label-ios-h{font-size:0.875rem;line-height:1.5}.label-stacked.sc-ion-label-ios-h{margin-bottom:4px;font-size:0.875rem}.label-floating.sc-ion-label-ios-h{margin-bottom:0;-webkit-transform:translate(0, 29px);transform:translate(0, 29px);-webkit-transform-origin:left top;transform-origin:left top;-webkit-transition:-webkit-transform 150ms ease-in-out;transition:-webkit-transform 150ms ease-in-out;transition:transform 150ms ease-in-out;transition:transform 150ms ease-in-out, -webkit-transform 150ms ease-in-out}[dir=rtl].sc-ion-label-ios-h -no-combinator.label-floating.sc-ion-label-ios-h,[dir=rtl] .sc-ion-label-ios-h -no-combinator.label-floating.sc-ion-label-ios-h,[dir=rtl].label-floating.sc-ion-label-ios-h,[dir=rtl] .label-floating.sc-ion-label-ios-h{-webkit-transform-origin:right top;transform-origin:right top}@supports selector(:dir(rtl)){.label-floating.sc-ion-label-ios-h:dir(rtl){-webkit-transform-origin:right top;transform-origin:right top}}.item-textarea.label-floating.sc-ion-label-ios-h,.item-textarea .label-floating.sc-ion-label-ios-h{-webkit-transform:translate(0, 28px);transform:translate(0, 28px)}.item-has-focus.label-floating.sc-ion-label-ios-h,.item-has-focus .label-floating.sc-ion-label-ios-h,.item-has-placeholder.sc-ion-label-ios-h:not(.item-input).label-floating,.item-has-placeholder:not(.item-input) .label-floating.sc-ion-label-ios-h,.item-has-value.label-floating.sc-ion-label-ios-h,.item-has-value .label-floating.sc-ion-label-ios-h{-webkit-transform:scale(0.82);transform:scale(0.82)}.sc-ion-label-ios-s h1{margin-left:0;margin-right:0;margin-top:3px;margin-bottom:2px;font-size:1.375rem;font-weight:normal}.sc-ion-label-ios-s h2{margin-left:0;margin-right:0;margin-top:0;margin-bottom:2px;font-size:1.0625rem;font-weight:normal}.sc-ion-label-ios-s h3,.sc-ion-label-ios-s h4,.sc-ion-label-ios-s h5,.sc-ion-label-ios-s h6{margin-left:0;margin-right:0;margin-top:0;margin-bottom:3px;font-size:0.875rem;font-weight:normal;line-height:normal}.sc-ion-label-ios-s p{margin-left:0;margin-right:0;margin-top:0;margin-bottom:2px;font-size:0.875rem;line-height:normal;text-overflow:inherit;overflow:inherit}.sc-ion-label-ios-s>p{color:var(--ion-color-step-400, var(--ion-text-color-step-600, #999999))}.sc-ion-label-ios-h.in-item-color.sc-ion-label-ios-s>p{color:inherit}.sc-ion-label-ios-s h2:last-child,.sc-ion-label-ios-s h3:last-child,.sc-ion-label-ios-s h4:last-child,.sc-ion-label-ios-s h5:last-child,.sc-ion-label-ios-s h6:last-child,.sc-ion-label-ios-s p:last-child{margin-bottom:0}";
|
|
280
280
|
const IonLabelIosStyle0 = labelIosCss;
|
|
281
281
|
|
|
282
282
|
const labelMdCss = ".item.sc-ion-label-md-h,.item .sc-ion-label-md-h{--color:initial;display:block;color:var(--color);font-family:var(--ion-font-family, inherit);font-size:inherit;text-overflow:ellipsis;-webkit-box-sizing:border-box;box-sizing:border-box}.ion-color.sc-ion-label-md-h{color:var(--ion-color-base)}.ion-text-nowrap.sc-ion-label-md-h{overflow:hidden}.item-interactive-disabled.sc-ion-label-md-h:not(.item-multiple-inputs),.item-interactive-disabled:not(.item-multiple-inputs) .sc-ion-label-md-h{cursor:default;opacity:0.3;pointer-events:none}.item-input.sc-ion-label-md-h,.item-input .sc-ion-label-md-h{-ms-flex:initial;flex:initial;max-width:200px;pointer-events:none}.item-textarea.sc-ion-label-md-h,.item-textarea .sc-ion-label-md-h{-ms-flex-item-align:baseline;align-self:baseline}.item-skeleton-text.sc-ion-label-md-h,.item-skeleton-text .sc-ion-label-md-h{overflow:hidden}.label-fixed.sc-ion-label-md-h{-ms-flex:0 0 100px;flex:0 0 100px;width:100px;min-width:100px;max-width:200px}.label-stacked.sc-ion-label-md-h,.label-floating.sc-ion-label-md-h{margin-bottom:0;-ms-flex-item-align:stretch;align-self:stretch;width:auto;max-width:100%}.label-no-animate.label-floating.sc-ion-label-md-h{-webkit-transition:none;transition:none}.sc-ion-label-md-s h1,.sc-ion-label-md-s h2,.sc-ion-label-md-s h3,.sc-ion-label-md-s h4,.sc-ion-label-md-s h5,.sc-ion-label-md-s h6{text-overflow:inherit;overflow:inherit}.ion-text-wrap.sc-ion-label-md-h{line-height:1.5}.label-stacked.sc-ion-label-md-h,.label-floating.sc-ion-label-md-h{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;-webkit-transform-origin:top left;transform-origin:top left}.label-stacked.label-rtl.sc-ion-label-md-h,.label-floating.label-rtl.sc-ion-label-md-h{-webkit-transform-origin:top right;transform-origin:top right}.label-stacked.sc-ion-label-md-h{-webkit-transform:translateY(50%) scale(0.75);transform:translateY(50%) scale(0.75);-webkit-transition:color 150ms cubic-bezier(0.4, 0, 0.2, 1);transition:color 150ms cubic-bezier(0.4, 0, 0.2, 1)}.label-floating.sc-ion-label-md-h{-webkit-transform:translateY(96%);transform:translateY(96%);-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)}.ion-focused.label-floating.sc-ion-label-md-h,.ion-focused .label-floating.sc-ion-label-md-h,.item-has-focus.label-floating.sc-ion-label-md-h,.item-has-focus .label-floating.sc-ion-label-md-h,.item-has-placeholder.sc-ion-label-md-h:not(.item-input).label-floating,.item-has-placeholder:not(.item-input) .label-floating.sc-ion-label-md-h,.item-has-value.label-floating.sc-ion-label-md-h,.item-has-value .label-floating.sc-ion-label-md-h{-webkit-transform:translateY(50%) scale(0.75);transform:translateY(50%) scale(0.75)}.ion-focused.label-stacked.sc-ion-label-md-h:not(.ion-color),.ion-focused .label-stacked.sc-ion-label-md-h:not(.ion-color),.ion-focused.label-floating.sc-ion-label-md-h:not(.ion-color),.ion-focused .label-floating.sc-ion-label-md-h:not(.ion-color),.item-has-focus.label-stacked.sc-ion-label-md-h:not(.ion-color),.item-has-focus .label-stacked.sc-ion-label-md-h:not(.ion-color),.item-has-focus.label-floating.sc-ion-label-md-h:not(.ion-color),.item-has-focus .label-floating.sc-ion-label-md-h:not(.ion-color){color:var(--ion-color-primary, #0054e9)}.ion-focused.ion-color.label-stacked.sc-ion-label-md-h:not(.ion-color),.ion-focused.ion-color .label-stacked.sc-ion-label-md-h:not(.ion-color),.ion-focused.ion-color.label-floating.sc-ion-label-md-h:not(.ion-color),.ion-focused.ion-color .label-floating.sc-ion-label-md-h:not(.ion-color),.item-has-focus.ion-color.label-stacked.sc-ion-label-md-h:not(.ion-color),.item-has-focus.ion-color .label-stacked.sc-ion-label-md-h:not(.ion-color),.item-has-focus.ion-color.label-floating.sc-ion-label-md-h:not(.ion-color),.item-has-focus.ion-color .label-floating.sc-ion-label-md-h:not(.ion-color){color:var(--ion-color-contrast)}.ion-invalid.ion-touched.label-stacked.sc-ion-label-md-h:not(.ion-color),.ion-invalid.ion-touched .label-stacked.sc-ion-label-md-h:not(.ion-color),.ion-invalid.ion-touched.label-floating.sc-ion-label-md-h:not(.ion-color),.ion-invalid.ion-touched .label-floating.sc-ion-label-md-h:not(.ion-color){color:var(--highlight-color-invalid)}.sc-ion-label-md-s h1{margin-left:0;margin-right:0;margin-top:0;margin-bottom:2px;font-size:1.5rem;font-weight:normal}.sc-ion-label-md-s h2{margin-left:0;margin-right:0;margin-top:2px;margin-bottom:2px;font-size:1rem;font-weight:normal}.sc-ion-label-md-s h3,.sc-ion-label-md-s h4,.sc-ion-label-md-s h5,.sc-ion-label-md-s h6{margin-left:0;margin-right:0;margin-top:2px;margin-bottom:2px;font-size:0.875rem;font-weight:normal;line-height:normal}.sc-ion-label-md-s p{margin-left:0;margin-right:0;margin-top:0;margin-bottom:2px;font-size:0.875rem;line-height:1.25rem;text-overflow:inherit;overflow:inherit}.sc-ion-label-md-s>p{color:var(--ion-color-step-600, var(--ion-text-color-step-400, #666666))}.sc-ion-label-md-h.in-item-color.sc-ion-label-md-s>p{color:inherit}";
|
|
@@ -383,14 +383,14 @@ const PickerColumn = class {
|
|
|
383
383
|
render() {
|
|
384
384
|
const { color, disabled, isActive, numericInput } = this;
|
|
385
385
|
const mode = getIonMode(this);
|
|
386
|
-
return (h(Host, { key: '
|
|
386
|
+
return (h(Host, { key: '54d3ea9f92136ac446a6c0a2b1389d93c5ff31ee', class: createColorClasses(color, {
|
|
387
387
|
[mode]: true,
|
|
388
388
|
['picker-column-active']: isActive,
|
|
389
389
|
['picker-column-numeric-input']: numericInput,
|
|
390
390
|
['picker-column-disabled']: disabled,
|
|
391
|
-
}) }, h("slot", { key: '
|
|
391
|
+
}) }, h("slot", { key: '969279123f09d37a28aa726936c9f484b0de33e4', name: "prefix" }), h("div", { key: 'd4d09a561213c408cf1c42a28cdef37f14367724', class: "picker-opts", tabindex: disabled ? undefined : 0, ref: (el) => {
|
|
392
392
|
this.scrollEl = el;
|
|
393
|
-
} }, h("div", { key: '
|
|
393
|
+
} }, h("div", { key: '3710d8980682c819be33eeb6611a5c707b0e6a29', class: "picker-item-empty", "aria-hidden": "true" }, "\u00A0"), h("div", { key: '65b7d8d523db669a2df107ae7aaacf62daf13232', class: "picker-item-empty", "aria-hidden": "true" }, "\u00A0"), h("div", { key: '694657e475edcdbc93561e826e0db016738f119d', class: "picker-item-empty", "aria-hidden": "true" }, "\u00A0"), h("slot", { key: 'ecbbd8db6ffdd8d8506a16d94f001d434f4daf97' }), h("div", { key: 'e19a7f7e5e4aeb7d52339e962314d68c31c6337b', class: "picker-item-empty", "aria-hidden": "true" }, "\u00A0"), h("div", { key: '103e6a5863efc526de3ea35c63230cc37e487594', class: "picker-item-empty", "aria-hidden": "true" }, "\u00A0"), h("div", { key: 'c9e2313ae630ec0b39cbc92d5261fc194dc22a5f', class: "picker-item-empty", "aria-hidden": "true" }, "\u00A0")), h("slot", { key: '1537926d9ed8d4251ded95dcb249197491fc2616', name: "suffix" })));
|
|
394
394
|
}
|
|
395
395
|
get el() { return getElement(this); }
|
|
396
396
|
static get watchers() { return {
|
|
@@ -287,7 +287,7 @@ const RadioGroup = class {
|
|
|
287
287
|
const { label, labelId, el, name, value } = this;
|
|
288
288
|
const mode = getIonMode(this);
|
|
289
289
|
renderHiddenInput(true, el, name, value, false);
|
|
290
|
-
return h(Host, { key: '
|
|
290
|
+
return h(Host, { key: '672d1df4a5d2fd22415e8772b054313907aba8f6', role: "radiogroup", "aria-labelledby": label ? labelId : null, onClick: this.onClick, class: mode });
|
|
291
291
|
}
|
|
292
292
|
get el() { return getElement(this); }
|
|
293
293
|
static get watchers() { return {
|
|
@@ -600,7 +600,7 @@ const Range = class {
|
|
|
600
600
|
const needsEndAdjustment = inItem && !hasEndContent;
|
|
601
601
|
const mode = getIonMode(this);
|
|
602
602
|
renderHiddenInput(true, el, this.name, JSON.stringify(this.getValue()), disabled);
|
|
603
|
-
return (h(Host, { key: '
|
|
603
|
+
return (h(Host, { key: 'f66f03965290003b8a2b74b6f16ebf5615291688', onFocusin: this.onFocus, onFocusout: this.onBlur, id: rangeId, class: createColorClasses(this.color, {
|
|
604
604
|
[mode]: true,
|
|
605
605
|
'in-item': inItem,
|
|
606
606
|
'range-disabled': disabled,
|
|
@@ -609,10 +609,10 @@ const Range = class {
|
|
|
609
609
|
[`range-label-placement-${labelPlacement}`]: true,
|
|
610
610
|
'range-item-start-adjustment': needsStartAdjustment,
|
|
611
611
|
'range-item-end-adjustment': needsEndAdjustment,
|
|
612
|
-
}) }, h("label", { key: '
|
|
612
|
+
}) }, h("label", { key: '4b0035999693e241afb753f4c335ec386a2f5a2b', class: "range-wrapper", id: "range-label" }, h("div", { key: 'f03119f14a4c6bb2f6c529e885002df633cd1797', class: {
|
|
613
613
|
'label-text-wrapper': true,
|
|
614
614
|
'label-text-wrapper-hidden': !hasLabel,
|
|
615
|
-
}, part: "label" }, label !== undefined ? h("div", { class: "label-text" }, label) : h("slot", { name: "label" })), h("div", { key: '
|
|
615
|
+
}, part: "label" }, label !== undefined ? h("div", { class: "label-text" }, label) : h("slot", { name: "label" })), h("div", { key: '72678b1d17ac2a6dfeee26d40a6a80bcc0e7e2fe', class: "native-wrapper" }, h("slot", { key: 'c555ac9598427b81fddd5415ea673479c2247977', name: "start" }), this.renderRangeSlider(), h("slot", { key: 'bf58ccc934a246b303c766d16df5eeb62c225b12', name: "end" })))));
|
|
616
616
|
}
|
|
617
617
|
get el() { return getElement(this); }
|
|
618
618
|
static get watchers() { return {
|
|
@@ -389,8 +389,8 @@ const Searchbar = class {
|
|
|
389
389
|
const clearIcon = this.clearIcon || (mode === 'ios' ? closeCircle : closeSharp);
|
|
390
390
|
const searchIcon = this.searchIcon || (mode === 'ios' ? searchOutline : searchSharp);
|
|
391
391
|
const shouldShowCancelButton = this.shouldShowCancelButton();
|
|
392
|
-
const cancelButton = this.showCancelButton !== 'never' && (h("button", { key: '
|
|
393
|
-
return (h(Host, { key: '
|
|
392
|
+
const cancelButton = this.showCancelButton !== 'never' && (h("button", { key: '2e53057ad0dcb8ea930fe4a4a03f08af5163d31e', "aria-label": cancelButtonText, "aria-hidden": shouldShowCancelButton ? undefined : 'true', type: "button", tabIndex: mode === 'ios' && !shouldShowCancelButton ? -1 : undefined, onMouseDown: this.onCancelSearchbar, onTouchStart: this.onCancelSearchbar, class: "searchbar-cancel-button" }, h("div", { key: '10b06fdbb3ae51bf02bd094205d075e1f9b60ea3', "aria-hidden": "true" }, mode === 'md' ? (h("ion-icon", { "aria-hidden": "true", mode: mode, icon: this.cancelButtonIcon, lazy: false })) : (cancelButtonText))));
|
|
393
|
+
return (h(Host, { key: 'f1a07f9e2f27f5297581e66c80097cf7843c1a5a', role: "search", "aria-disabled": this.disabled ? 'true' : null, class: createColorClasses(this.color, {
|
|
394
394
|
[mode]: true,
|
|
395
395
|
'searchbar-animated': animated,
|
|
396
396
|
'searchbar-disabled': this.disabled,
|
|
@@ -400,14 +400,14 @@ const Searchbar = class {
|
|
|
400
400
|
'searchbar-has-focus': this.focused,
|
|
401
401
|
'searchbar-should-show-clear': this.shouldShowClearButton(),
|
|
402
402
|
'searchbar-should-show-cancel': this.shouldShowCancelButton(),
|
|
403
|
-
}) }, h("div", { key: '
|
|
403
|
+
}) }, h("div", { key: '9b7dc9abf5b1925872c75f6c992aac465700b615', class: "searchbar-input-container" }, h("input", Object.assign({ key: 'd0e11e98bfb8b9e9225de80c8f132f68c3466f13', "aria-label": "search text", disabled: this.disabled, ref: (el) => (this.nativeInput = el), class: "searchbar-input", inputMode: this.inputmode, enterKeyHint: this.enterkeyhint, name: this.name, onInput: this.onInput, onChange: this.onChange, onBlur: this.onBlur, onFocus: this.onFocus, minLength: this.minlength, maxLength: this.maxlength, placeholder: this.placeholder, type: this.type, value: this.getValue(), autoCapitalize: autocapitalize === 'default' ? undefined : autocapitalize, autoComplete: this.autocomplete, autoCorrect: this.autocorrect, spellcheck: this.spellcheck }, this.inheritedAttributes)), mode === 'md' && cancelButton, h("ion-icon", { key: 'd475776f64b55d13d49f8193f3b84a4e669403c7', "aria-hidden": "true", mode: mode, icon: searchIcon, lazy: false, class: "searchbar-search-icon" }), h("button", { key: '9b5b681edfac608ed1c20175086ec40c652a7f07', "aria-label": "reset", type: "button", "no-blur": true, class: "searchbar-clear-button", onPointerDown: (ev) => {
|
|
404
404
|
/**
|
|
405
405
|
* This prevents mobile browsers from
|
|
406
406
|
* blurring the input when the clear
|
|
407
407
|
* button is activated.
|
|
408
408
|
*/
|
|
409
409
|
ev.preventDefault();
|
|
410
|
-
}, onClick: () => this.onClearInput(true) }, h("ion-icon", { key: '
|
|
410
|
+
}, onClick: () => this.onClearInput(true) }, h("ion-icon", { key: '44c85c0d3a1346c5e9306a65f6a7cf0fcdc1f149', "aria-hidden": "true", mode: mode, icon: clearIcon, lazy: false, class: "searchbar-clear-icon" }))), mode === 'ios' && cancelButton));
|
|
411
411
|
}
|
|
412
412
|
get el() { return getElement(this); }
|
|
413
413
|
static get watchers() { return {
|
|
@@ -426,14 +426,14 @@ const Segment = class {
|
|
|
426
426
|
}
|
|
427
427
|
render() {
|
|
428
428
|
const mode = getIonMode(this);
|
|
429
|
-
return (h(Host, { key: '
|
|
429
|
+
return (h(Host, { key: '107be9ad856d855db449d24cd75f9fb82746e9aa', role: "tablist", onClick: this.onClick, class: createColorClasses(this.color, {
|
|
430
430
|
[mode]: true,
|
|
431
431
|
'in-toolbar': hostContext('ion-toolbar', this.el),
|
|
432
432
|
'in-toolbar-color': hostContext('ion-toolbar[color]', this.el),
|
|
433
433
|
'segment-activated': this.activated,
|
|
434
434
|
'segment-disabled': this.disabled,
|
|
435
435
|
'segment-scrollable': this.scrollable,
|
|
436
|
-
}) }, h("slot", { key: '
|
|
436
|
+
}) }, h("slot", { key: 'bdb223b18a62af921084301f01a728c421379646' })));
|
|
437
437
|
}
|
|
438
438
|
get el() { return getElement(this); }
|
|
439
439
|
static get watchers() { return {
|
|
@@ -582,7 +582,7 @@ const Select = class {
|
|
|
582
582
|
* TODO(FW-5592): Remove hasStartEndSlots condition
|
|
583
583
|
*/
|
|
584
584
|
const labelShouldFloat = labelPlacement === 'stacked' || (labelPlacement === 'floating' && (hasValue || isExpanded || hasStartEndSlots));
|
|
585
|
-
return (h(Host, { key: '
|
|
585
|
+
return (h(Host, { key: 'df8333e037d8cb9fd34af7f3525608d7bd0ec0f4', onClick: this.onClick, class: createColorClasses(this.color, {
|
|
586
586
|
[mode]: true,
|
|
587
587
|
'in-item': inItem,
|
|
588
588
|
'in-item-color': hostContext('ion-item.ion-color', el),
|
|
@@ -598,7 +598,7 @@ const Select = class {
|
|
|
598
598
|
[`select-justify-${justify}`]: justifyEnabled,
|
|
599
599
|
[`select-shape-${shape}`]: shape !== undefined,
|
|
600
600
|
[`select-label-placement-${labelPlacement}`]: true,
|
|
601
|
-
}) }, h("label", { key: '
|
|
601
|
+
}) }, h("label", { key: '3b165b4c7512bcf750bac885aef67745db53a840', class: "select-wrapper", id: "select-label" }, this.renderLabelContainer(), h("div", { key: '1b0cac005aff58ba067efe7e1165b3375716c57e', class: "select-wrapper-inner" }, h("slot", { key: '0552b33874ec305d3406876d5714a1dc4f0dc2c1', name: "start" }), h("div", { key: '7d56e2610cc026f844373590f8229164baff2c62', class: "native-wrapper", ref: (el) => (this.nativeWrapperEl = el), part: "container" }, this.renderSelectText(), this.renderListbox()), h("slot", { key: '79d8daef62fce370d804734390d8ba47dc611d36', name: "end" }), !hasFloatingOrStackedLabel && this.renderSelectIcon()), hasFloatingOrStackedLabel && this.renderSelectIcon(), shouldRenderHighlight && h("div", { key: 'be8b6f8c45b5062618ba50b2311f1143210bcc59', class: "select-highlight" }))));
|
|
602
602
|
}
|
|
603
603
|
get el() { return getElement(this); }
|
|
604
604
|
static get watchers() { return {
|
|
@@ -365,7 +365,7 @@ const Textarea = class {
|
|
|
365
365
|
* TODO(FW-5592): Remove hasStartEndSlots condition
|
|
366
366
|
*/
|
|
367
367
|
const labelShouldFloat = labelPlacement === 'stacked' || (labelPlacement === 'floating' && (hasValue || hasFocus || hasStartEndSlots));
|
|
368
|
-
return (h(Host, { key: '
|
|
368
|
+
return (h(Host, { key: '16eeb87ea5dbac1b37f1a376cd74e6f41af1b5f6', class: createColorClasses(this.color, {
|
|
369
369
|
[mode]: true,
|
|
370
370
|
'has-value': hasValue,
|
|
371
371
|
'has-focus': hasFocus,
|
|
@@ -374,7 +374,7 @@ const Textarea = class {
|
|
|
374
374
|
[`textarea-shape-${shape}`]: shape !== undefined,
|
|
375
375
|
[`textarea-label-placement-${labelPlacement}`]: true,
|
|
376
376
|
'textarea-disabled': disabled,
|
|
377
|
-
}) }, h("label", { key: '
|
|
377
|
+
}) }, h("label", { key: '5f7946957517614b937eb37533a87c124cf3eabb', class: "textarea-wrapper", htmlFor: inputId }, this.renderLabelContainer(), h("div", { key: '4e950025447d83f3ec77b515a2c5cd6511819b7e', class: "textarea-wrapper-inner" }, h("div", { key: 'a508e5879a9f7b3f2a91d5b1851ab990302044fe', class: "start-slot-wrapper" }, h("slot", { key: 'a2b18078c602896be5ae2da71519f534aa24bbc4', name: "start" })), h("div", { key: '5a4d07c72794548d7f0945aebc5bc2c65118cac3', class: "native-wrapper", ref: (el) => (this.textareaWrapper = el) }, h("textarea", Object.assign({ key: 'f13d0e8b96a798d3cec017b2b618e4979555c5ee', 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 }, this.inheritedAttributes), value)), h("div", { key: '10b8792a1506b41928869a4460b6f780c39947b6', class: "end-slot-wrapper" }, h("slot", { key: '26362017095ffdda6749a19e0152ef4da8759fba', name: "end" }))), shouldRenderHighlight && h("div", { key: '06a6135b05848b3855192f162ec293d9eae6e171', class: "textarea-highlight" })), this.renderBottomContent()));
|
|
378
378
|
}
|
|
379
379
|
get el() { return getElement(this); }
|
|
380
380
|
static get watchers() { return {
|
|
@@ -160,7 +160,7 @@ const Toggle = class {
|
|
|
160
160
|
const value = this.getValue();
|
|
161
161
|
const rtl = isRTL(el) ? 'rtl' : 'ltr';
|
|
162
162
|
renderHiddenInput(true, el, name, checked ? value : '', disabled);
|
|
163
|
-
return (h(Host, { key: '
|
|
163
|
+
return (h(Host, { key: '9083d3ea92131df1480dfdaacd62037ffd5a69ec', onClick: this.onClick, class: createColorClasses(color, {
|
|
164
164
|
[mode]: true,
|
|
165
165
|
'in-item': hostContext('ion-item', el),
|
|
166
166
|
'toggle-activated': activated,
|
|
@@ -170,10 +170,10 @@ const Toggle = class {
|
|
|
170
170
|
[`toggle-alignment-${alignment}`]: true,
|
|
171
171
|
[`toggle-label-placement-${labelPlacement}`]: true,
|
|
172
172
|
[`toggle-${rtl}`]: true,
|
|
173
|
-
}) }, h("label", { key: '
|
|
173
|
+
}) }, h("label", { key: '554e11ac1db370363b251b83e4d57c32a2bd4577', class: "toggle-wrapper" }, h("input", Object.assign({ key: '327540a212dfe686310e8a587fa8c81edfd2e229', type: "checkbox", role: "switch", "aria-checked": `${checked}`, checked: checked, disabled: disabled, id: inputId, onFocus: () => this.onFocus(), onBlur: () => this.onBlur(), ref: (focusEl) => (this.focusEl = focusEl) }, this.inheritedAttributes)), h("div", { key: '9ba185a8afaf65c8ba0d2044b1abfa376aee4db3', class: {
|
|
174
174
|
'label-text-wrapper': true,
|
|
175
175
|
'label-text-wrapper-hidden': !this.hasLabel,
|
|
176
|
-
}, part: "label" }, h("slot", { key: '
|
|
176
|
+
}, part: "label" }, h("slot", { key: '730287f916c13ec437f39f2304a70afa50f41dc7' })), h("div", { key: '0e810cdf6dc7623d4efd2092a642ef12906efcae', class: "native-wrapper" }, this.renderToggleControl()))));
|
|
177
177
|
}
|
|
178
178
|
get el() { return getElement(this); }
|
|
179
179
|
static get watchers() { return {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import{__awaiter,__generator,__spreadArray}from"tslib";
|
|
2
2
|
/*!
|
|
3
3
|
* (C) Ionic http://ionicframework.com - MIT License
|
|
4
|
-
*/import{r as registerInstance,h,f as Host,i as getElement,d as createEvent}from"./index-5dc2b88e.js";import{r as raf,t as transitionEndAsync,a as addEventListener,b as removeEventListener,g as getElementRoot}from"./helpers-da915de8.js";import{l as chevronDown}from"./index-e2cf2ceb.js";import{c as config,b as getIonMode}from"./ionic-global-d2d8f882.js";import{p as printIonWarning}from"./index-9b0d46f4.js";var accordionIosCss=":host{display:block;position:relative;width:100%;background-color:var(--ion-background-color, #ffffff);overflow:hidden;z-index:0}:host(.accordion-expanding) ::slotted(ion-item[slot=header]),:host(.accordion-expanded) ::slotted(ion-item[slot=header]){--border-width:0px}:host(.accordion-animated){-webkit-transition:all 300ms cubic-bezier(0.25, 0.8, 0.5, 1);transition:all 300ms cubic-bezier(0.25, 0.8, 0.5, 1)}:host(.accordion-animated) #content{-webkit-transition:max-height 300ms cubic-bezier(0.25, 0.8, 0.5, 1);transition:max-height 300ms cubic-bezier(0.25, 0.8, 0.5, 1)}#content{overflow:hidden;will-change:max-height}:host(.accordion-collapsing) #content{max-height:0 !important}:host(.accordion-collapsed) #content{display:none}:host(.accordion-expanding) #content{max-height:0}:host(.accordion-expanding) #content-wrapper{overflow:auto}:host(.accordion-disabled) #header,:host(.accordion-readonly) #header,:host(.accordion-disabled) #content,:host(.accordion-readonly) #content{pointer-events:none}:host(.accordion-disabled) #header,:host(.accordion-disabled) #content{opacity:0.4}@media (prefers-reduced-motion: reduce){:host,#content{-webkit-transition:none !important;transition:none !important}}:host(.accordion-next) ::slotted(ion-item[slot=header]){--border-width:0.55px 0px 0.55px 0px}";var IonAccordionIosStyle0=accordionIosCss;var accordionMdCss=":host{display:block;position:relative;width:100%;background-color:var(--ion-background-color, #ffffff);overflow:hidden;z-index:0}:host(.accordion-expanding) ::slotted(ion-item[slot=header]),:host(.accordion-expanded) ::slotted(ion-item[slot=header]){--border-width:0px}:host(.accordion-animated){-webkit-transition:all 300ms cubic-bezier(0.25, 0.8, 0.5, 1);transition:all 300ms cubic-bezier(0.25, 0.8, 0.5, 1)}:host(.accordion-animated) #content{-webkit-transition:max-height 300ms cubic-bezier(0.25, 0.8, 0.5, 1);transition:max-height 300ms cubic-bezier(0.25, 0.8, 0.5, 1)}#content{overflow:hidden;will-change:max-height}:host(.accordion-collapsing) #content{max-height:0 !important}:host(.accordion-collapsed) #content{display:none}:host(.accordion-expanding) #content{max-height:0}:host(.accordion-expanding) #content-wrapper{overflow:auto}:host(.accordion-disabled) #header,:host(.accordion-readonly) #header,:host(.accordion-disabled) #content,:host(.accordion-readonly) #content{pointer-events:none}:host(.accordion-disabled) #header,:host(.accordion-disabled) #content{opacity:0.4}@media (prefers-reduced-motion: reduce){:host,#content{-webkit-transition:none !important;transition:none !important}}";var IonAccordionMdStyle0=accordionMdCss;var Accordion=function(){function n(n){var e=this;registerInstance(this,n);this.updateListener=function(){return e.updateState(false)};this.setItemDefaults=function(){var n=e.getSlottedHeaderIonItem();if(!n){return}n.button=true;n.detail=false;if(n.lines===undefined){n.lines="full"}};this.getSlottedHeaderIonItem=function(){var n=e.headerEl;if(!n){return}var t=n.querySelector("slot");if(!t){return}if(t.assignedElements===undefined)return;return t.assignedElements().find((function(n){return n.tagName==="ION-ITEM"}))};this.setAria=function(n){if(n===void 0){n=false}var t=e.getSlottedHeaderIonItem();if(!t){return}var i=getElementRoot(t);var r=i.querySelector("button");if(!r){return}r.setAttribute("aria-expanded","".concat(n))};this.slotToggleIcon=function(){var n=e.getSlottedHeaderIonItem();if(!n){return}var t=e,i=t.toggleIconSlot,r=t.toggleIcon;var o=n.querySelector(".ion-accordion-toggle-icon");if(o){return}var a=document.createElement("ion-icon");a.slot=i;a.lazy=false;a.classList.add("ion-accordion-toggle-icon");a.icon=r;a.setAttribute("aria-hidden","true");n.appendChild(a)};this.expandAccordion=function(n){if(n===void 0){n=false}var t=e,i=t.contentEl,r=t.contentElWrapper;if(n||i===undefined||r===undefined){e.state=4;return}if(e.state===4){return}if(e.currentRaf!==undefined){cancelAnimationFrame(e.currentRaf)}if(e.shouldAnimate()){raf((function(){e.state=8;e.currentRaf=raf((function(){return __awaiter(e,void 0,void 0,(function(){var n,e;return __generator(this,(function(t){switch(t.label){case 0:n=r.offsetHeight;e=transitionEndAsync(i,2e3);i.style.setProperty("max-height","".concat(n,"px"));return[4,e];case 1:t.sent();this.state=4;i.style.removeProperty("max-height");return[2]}}))}))}))}))}else{e.state=4}};this.collapseAccordion=function(n){if(n===void 0){n=false}var t=e.contentEl;if(n||t===undefined){e.state=1;return}if(e.state===1){return}if(e.currentRaf!==undefined){cancelAnimationFrame(e.currentRaf)}if(e.shouldAnimate()){e.currentRaf=raf((function(){return __awaiter(e,void 0,void 0,(function(){var n;var e=this;return __generator(this,(function(i){n=t.offsetHeight;t.style.setProperty("max-height","".concat(n,"px"));raf((function(){return __awaiter(e,void 0,void 0,(function(){var n;return __generator(this,(function(e){switch(e.label){case 0:n=transitionEndAsync(t,2e3);this.state=2;return[4,n];case 1:e.sent();this.state=1;t.style.removeProperty("max-height");return[2]}}))}))}));return[2]}))}))}))}else{e.state=1}};this.shouldAnimate=function(){if(typeof window==="undefined"){return false}var n=matchMedia("(prefers-reduced-motion: reduce)").matches;if(n){return false}var t=config.get("animated",true);if(!t){return false}if(e.accordionGroupEl&&!e.accordionGroupEl.animated){return false}return true};this.updateState=function(){var n=[];for(var t=0;t<arguments.length;t++){n[t]=arguments[t]}return __awaiter(e,__spreadArray([],n,true),void 0,(function(n){var e,t,i,r,o,a,s,c;if(n===void 0){n=false}return __generator(this,(function(d){e=this.accordionGroupEl;t=this.value;if(!e){return[2]}i=e.value;r=Array.isArray(i)?i.includes(t):i===t;if(r){this.expandAccordion(n);this.isNext=this.isPrevious=false}else{this.collapseAccordion(n);o=this.getNextSibling();a=o===null||o===void 0?void 0:o.value;if(a!==undefined){this.isPrevious=Array.isArray(i)?i.includes(a):i===a}s=this.getPreviousSibling();c=s===null||s===void 0?void 0:s.value;if(c!==undefined){this.isNext=Array.isArray(i)?i.includes(c):i===c}}return[2]}))}))};this.getNextSibling=function(){if(!e.el){return}var n=e.el.nextElementSibling;if((n===null||n===void 0?void 0:n.tagName)!=="ION-ACCORDION"){return}return n};this.getPreviousSibling=function(){if(!e.el){return}var n=e.el.previousElementSibling;if((n===null||n===void 0?void 0:n.tagName)!=="ION-ACCORDION"){return}return n};this.state=1;this.isNext=false;this.isPrevious=false;this.value="ion-accordion-".concat(accordionIds++);this.disabled=false;this.readonly=false;this.toggleIcon=chevronDown;this.toggleIconSlot="end"}n.prototype.valueChanged=function(){this.updateState()};n.prototype.connectedCallback=function(){var n;var e=this.accordionGroupEl=(n=this.el)===null||n===void 0?void 0:n.closest("ion-accordion-group");if(e){this.updateState(true);addEventListener(e,"ionValueChange",this.updateListener)}};n.prototype.disconnectedCallback=function(){var n=this.accordionGroupEl;if(n){removeEventListener(n,"ionValueChange",this.updateListener)}};n.prototype.componentDidLoad=function(){var n=this;this.setItemDefaults();this.slotToggleIcon();raf((function(){var e=n.state===4||n.state===8;n.setAria(e)}))};n.prototype.toggleExpanded=function(){var n=this,e=n.accordionGroupEl,t=n.disabled,i=n.readonly,r=n.value,o=n.state;if(t||i)return;if(e){var a=o===1||o===2;e.requestAccordionToggle(r,a)}};n.prototype.render=function(){var n;var e=this;var t=this,i=t.disabled,r=t.readonly;var o=getIonMode(this);var a=this.state===4||this.state===8;var s=a?"header expanded":"header";var c=a?"content expanded":"content";this.setAria(a);return h(Host,{key:"073e1d02c18dcbc20c68648426e87c14750c031d",class:(n={},n[o]=true,n["accordion-expanding"]=this.state===8,n["accordion-expanded"]=this.state===4,n["accordion-collapsing"]=this.state===2,n["accordion-collapsed"]=this.state===1,n["accordion-next"]=this.isNext,n["accordion-previous"]=this.isPrevious,n["accordion-disabled"]=i,n["accordion-readonly"]=r,n["accordion-animated"]=this.shouldAnimate(),n)},h("div",{key:"9b4cf326de8bb6b4033992903c0c1bfd7eea9bcc",onClick:function(){return e.toggleExpanded()},id:"header",part:s,"aria-controls":"content",ref:function(n){return e.headerEl=n}},h("slot",{key:"464c32a37f64655eacf4218284214f5f30b14a1e",name:"header"})),h("div",{key:"8bb52e6a62d7de0106b253201a89a32e79d9a594",id:"content",part:c,role:"region","aria-labelledby":"header",ref:function(n){return e.contentEl=n}},h("div",{key:"1d9dfd952ad493754aaeea7a8f625b33c2dd90a0",id:"content-wrapper",ref:function(n){return e.contentElWrapper=n}},h("slot",{key:"970dfbc55a612d739d0ca3b7b1a08e5c96d0c479",name:"content"}))))};Object.defineProperty(n,"delegatesFocus",{get:function(){return true},enumerable:false,configurable:true});Object.defineProperty(n.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(n,"watchers",{get:function(){return{value:["valueChanged"]}},enumerable:false,configurable:true});return n}();var accordionIds=0;Accordion.style={ios:IonAccordionIosStyle0,md:IonAccordionMdStyle0};var accordionGroupIosCss=":host{display:block}:host(.accordion-group-expand-inset){-webkit-margin-start:16px;margin-inline-start:16px;-webkit-margin-end:16px;margin-inline-end:16px;margin-top:16px;margin-bottom:16px}:host(.accordion-group-expand-inset) ::slotted(ion-accordion.accordion-expanding),:host(.accordion-group-expand-inset) ::slotted(ion-accordion.accordion-expanded){border-bottom:none}";var IonAccordionGroupIosStyle0=accordionGroupIosCss;var accordionGroupMdCss=":host{display:block}:host(.accordion-group-expand-inset){-webkit-margin-start:16px;margin-inline-start:16px;-webkit-margin-end:16px;margin-inline-end:16px;margin-top:16px;margin-bottom:16px}:host(.accordion-group-expand-inset) ::slotted(ion-accordion){-webkit-box-shadow:0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12);box-shadow:0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12)}:host(.accordion-group-expand-inset) ::slotted(ion-accordion.accordion-expanding),:host(.accordion-group-expand-inset) ::slotted(ion-accordion.accordion-expanded){margin-left:0;margin-right:0;margin-top:16px;margin-bottom:16px;border-radius:6px}:host(.accordion-group-expand-inset) ::slotted(ion-accordion.accordion-previous){border-end-end-radius:6px;border-end-start-radius:6px}:host(.accordion-group-expand-inset) ::slotted(ion-accordion.accordion-next){border-start-start-radius:6px;border-start-end-radius:6px}:host(.accordion-group-expand-inset) ::slotted(ion-accordion):first-of-type{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0}";var IonAccordionGroupMdStyle0=accordionGroupMdCss;var AccordionGroup=function(){function n(n){registerInstance(this,n);this.ionChange=createEvent(this,"ionChange",7);this.ionValueChange=createEvent(this,"ionValueChange",7);this.animated=true;this.multiple=undefined;this.value=undefined;this.disabled=false;this.readonly=false;this.expand="compact"}n.prototype.valueChanged=function(){var n=this,e=n.value,t=n.multiple;if(!t&&Array.isArray(e)){printIonWarning('ion-accordion-group was passed an array of values, but multiple="false". This is incorrect usage and may result in unexpected behaviors. To dismiss this warning, pass a string to the "value" property when multiple="false".\n\n Value Passed: ['.concat(e.map((function(n){return"'".concat(n,"'")})).join(", "),"]\n"),this.el)}this.ionValueChange.emit({value:this.value})};n.prototype.disabledChanged=function(){return __awaiter(this,void 0,void 0,(function(){var n,e,t,i,r;return __generator(this,(function(o){switch(o.label){case 0:n=this.disabled;return[4,this.getAccordions()];case 1:e=o.sent();for(t=0,i=e;t<i.length;t++){r=i[t];r.disabled=n}return[2]}}))}))};n.prototype.readonlyChanged=function(){return __awaiter(this,void 0,void 0,(function(){var n,e,t,i,r;return __generator(this,(function(o){switch(o.label){case 0:n=this.readonly;return[4,this.getAccordions()];case 1:e=o.sent();for(t=0,i=e;t<i.length;t++){r=i[t];r.readonly=n}return[2]}}))}))};n.prototype.onKeydown=function(n){return __awaiter(this,void 0,void 0,(function(){var e,t,i,r,o,a,s;return __generator(this,(function(c){switch(c.label){case 0:e=document.activeElement;if(!e){return[2]}t=e.closest('ion-accordion [slot="header"]');if(!t){return[2]}i=e.tagName==="ION-ACCORDION"?e:e.closest("ion-accordion");if(!i){return[2]}r=i.closest("ion-accordion-group");if(r!==this.el){return[2]}return[4,this.getAccordions()];case 1:o=c.sent();a=o.findIndex((function(n){return n===i}));if(a===-1){return[2]}if(n.key==="ArrowDown"){s=this.findNextAccordion(o,a)}else if(n.key==="ArrowUp"){s=this.findPreviousAccordion(o,a)}else if(n.key==="Home"){s=o[0]}else if(n.key==="End"){s=o[o.length-1]}if(s!==undefined&&s!==e){s.focus()}return[2]}}))}))};n.prototype.componentDidLoad=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(n){if(this.disabled){this.disabledChanged()}if(this.readonly){this.readonlyChanged()}this.valueChanged();return[2]}))}))};n.prototype.setValue=function(n){var e=this.value=n;this.ionChange.emit({value:e})};n.prototype.requestAccordionToggle=function(n,e){return __awaiter(this,void 0,void 0,(function(){var t,i,r,o,a,s,c,d,s,c;return __generator(this,(function(u){t=this,i=t.multiple,r=t.value,o=t.readonly,a=t.disabled;if(o||a){return[2]}if(e){if(i){s=r!==null&&r!==void 0?r:[];c=Array.isArray(s)?s:[s];d=c.find((function(e){return e===n}));if(d===undefined&&n!==undefined){this.setValue(__spreadArray(__spreadArray([],c,true),[n],false))}}else{this.setValue(n)}}else{if(i){s=r!==null&&r!==void 0?r:[];c=Array.isArray(s)?s:[s];this.setValue(c.filter((function(e){return e!==n})))}else{this.setValue(undefined)}}return[2]}))}))};n.prototype.findNextAccordion=function(n,e){var t=n[e+1];if(t===undefined){return n[0]}return t};n.prototype.findPreviousAccordion=function(n,e){var t=n[e-1];if(t===undefined){return n[n.length-1]}return t};n.prototype.getAccordions=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(n){return[2,Array.from(this.el.querySelectorAll(":scope > ion-accordion"))]}))}))};n.prototype.render=function(){var n;var e=this,t=e.disabled,i=e.readonly,r=e.expand;var o=getIonMode(this);return h(Host,{key:"ac2e26ac91c95d08172bd2b51daa7a711c21db9e",class:(n={},n[o]=true,n["accordion-group-disabled"]=t,n["accordion-group-readonly"]=i,n["accordion-group-expand-".concat(r)]=true,n),role:"presentation"},h("slot",{key:"444adc2af5730897eba57095da046d6bdb5af70f"}))};Object.defineProperty(n.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(n,"watchers",{get:function(){return{value:["valueChanged"],disabled:["disabledChanged"],readonly:["readonlyChanged"]}},enumerable:false,configurable:true});return n}();AccordionGroup.style={ios:IonAccordionGroupIosStyle0,md:IonAccordionGroupMdStyle0};export{Accordion as ion_accordion,AccordionGroup as ion_accordion_group};
|
|
4
|
+
*/import{r as registerInstance,h,f as Host,i as getElement,d as createEvent}from"./index-5dc2b88e.js";import{r as raf,t as transitionEndAsync,a as addEventListener,b as removeEventListener,g as getElementRoot}from"./helpers-da915de8.js";import{l as chevronDown}from"./index-e2cf2ceb.js";import{c as config,b as getIonMode}from"./ionic-global-d2d8f882.js";import{p as printIonWarning}from"./index-9b0d46f4.js";var accordionIosCss=":host{display:block;position:relative;width:100%;background-color:var(--ion-background-color, #ffffff);overflow:hidden;z-index:0}:host(.accordion-expanding) ::slotted(ion-item[slot=header]),:host(.accordion-expanded) ::slotted(ion-item[slot=header]){--border-width:0px}:host(.accordion-animated){-webkit-transition:all 300ms cubic-bezier(0.25, 0.8, 0.5, 1);transition:all 300ms cubic-bezier(0.25, 0.8, 0.5, 1)}:host(.accordion-animated) #content{-webkit-transition:max-height 300ms cubic-bezier(0.25, 0.8, 0.5, 1);transition:max-height 300ms cubic-bezier(0.25, 0.8, 0.5, 1)}#content{overflow:hidden;will-change:max-height}:host(.accordion-collapsing) #content{max-height:0 !important}:host(.accordion-collapsed) #content{display:none}:host(.accordion-expanding) #content{max-height:0}:host(.accordion-expanding) #content-wrapper{overflow:auto}:host(.accordion-disabled) #header,:host(.accordion-readonly) #header,:host(.accordion-disabled) #content,:host(.accordion-readonly) #content{pointer-events:none}:host(.accordion-disabled) #header,:host(.accordion-disabled) #content{opacity:0.4}@media (prefers-reduced-motion: reduce){:host,#content{-webkit-transition:none !important;transition:none !important}}:host(.accordion-next) ::slotted(ion-item[slot=header]){--border-width:0.55px 0px 0.55px 0px}";var IonAccordionIosStyle0=accordionIosCss;var accordionMdCss=":host{display:block;position:relative;width:100%;background-color:var(--ion-background-color, #ffffff);overflow:hidden;z-index:0}:host(.accordion-expanding) ::slotted(ion-item[slot=header]),:host(.accordion-expanded) ::slotted(ion-item[slot=header]){--border-width:0px}:host(.accordion-animated){-webkit-transition:all 300ms cubic-bezier(0.25, 0.8, 0.5, 1);transition:all 300ms cubic-bezier(0.25, 0.8, 0.5, 1)}:host(.accordion-animated) #content{-webkit-transition:max-height 300ms cubic-bezier(0.25, 0.8, 0.5, 1);transition:max-height 300ms cubic-bezier(0.25, 0.8, 0.5, 1)}#content{overflow:hidden;will-change:max-height}:host(.accordion-collapsing) #content{max-height:0 !important}:host(.accordion-collapsed) #content{display:none}:host(.accordion-expanding) #content{max-height:0}:host(.accordion-expanding) #content-wrapper{overflow:auto}:host(.accordion-disabled) #header,:host(.accordion-readonly) #header,:host(.accordion-disabled) #content,:host(.accordion-readonly) #content{pointer-events:none}:host(.accordion-disabled) #header,:host(.accordion-disabled) #content{opacity:0.4}@media (prefers-reduced-motion: reduce){:host,#content{-webkit-transition:none !important;transition:none !important}}";var IonAccordionMdStyle0=accordionMdCss;var Accordion=function(){function n(n){var e=this;registerInstance(this,n);this.updateListener=function(){return e.updateState(false)};this.setItemDefaults=function(){var n=e.getSlottedHeaderIonItem();if(!n){return}n.button=true;n.detail=false;if(n.lines===undefined){n.lines="full"}};this.getSlottedHeaderIonItem=function(){var n=e.headerEl;if(!n){return}var t=n.querySelector("slot");if(!t){return}if(t.assignedElements===undefined)return;return t.assignedElements().find((function(n){return n.tagName==="ION-ITEM"}))};this.setAria=function(n){if(n===void 0){n=false}var t=e.getSlottedHeaderIonItem();if(!t){return}var i=getElementRoot(t);var r=i.querySelector("button");if(!r){return}r.setAttribute("aria-expanded","".concat(n))};this.slotToggleIcon=function(){var n=e.getSlottedHeaderIonItem();if(!n){return}var t=e,i=t.toggleIconSlot,r=t.toggleIcon;var o=n.querySelector(".ion-accordion-toggle-icon");if(o){return}var a=document.createElement("ion-icon");a.slot=i;a.lazy=false;a.classList.add("ion-accordion-toggle-icon");a.icon=r;a.setAttribute("aria-hidden","true");n.appendChild(a)};this.expandAccordion=function(n){if(n===void 0){n=false}var t=e,i=t.contentEl,r=t.contentElWrapper;if(n||i===undefined||r===undefined){e.state=4;return}if(e.state===4){return}if(e.currentRaf!==undefined){cancelAnimationFrame(e.currentRaf)}if(e.shouldAnimate()){raf((function(){e.state=8;e.currentRaf=raf((function(){return __awaiter(e,void 0,void 0,(function(){var n,e;return __generator(this,(function(t){switch(t.label){case 0:n=r.offsetHeight;e=transitionEndAsync(i,2e3);i.style.setProperty("max-height","".concat(n,"px"));return[4,e];case 1:t.sent();this.state=4;i.style.removeProperty("max-height");return[2]}}))}))}))}))}else{e.state=4}};this.collapseAccordion=function(n){if(n===void 0){n=false}var t=e.contentEl;if(n||t===undefined){e.state=1;return}if(e.state===1){return}if(e.currentRaf!==undefined){cancelAnimationFrame(e.currentRaf)}if(e.shouldAnimate()){e.currentRaf=raf((function(){return __awaiter(e,void 0,void 0,(function(){var n;var e=this;return __generator(this,(function(i){n=t.offsetHeight;t.style.setProperty("max-height","".concat(n,"px"));raf((function(){return __awaiter(e,void 0,void 0,(function(){var n;return __generator(this,(function(e){switch(e.label){case 0:n=transitionEndAsync(t,2e3);this.state=2;return[4,n];case 1:e.sent();this.state=1;t.style.removeProperty("max-height");return[2]}}))}))}));return[2]}))}))}))}else{e.state=1}};this.shouldAnimate=function(){if(typeof window==="undefined"){return false}var n=matchMedia("(prefers-reduced-motion: reduce)").matches;if(n){return false}var t=config.get("animated",true);if(!t){return false}if(e.accordionGroupEl&&!e.accordionGroupEl.animated){return false}return true};this.updateState=function(){var n=[];for(var t=0;t<arguments.length;t++){n[t]=arguments[t]}return __awaiter(e,__spreadArray([],n,true),void 0,(function(n){var e,t,i,r,o,a,s,c;if(n===void 0){n=false}return __generator(this,(function(d){e=this.accordionGroupEl;t=this.value;if(!e){return[2]}i=e.value;r=Array.isArray(i)?i.includes(t):i===t;if(r){this.expandAccordion(n);this.isNext=this.isPrevious=false}else{this.collapseAccordion(n);o=this.getNextSibling();a=o===null||o===void 0?void 0:o.value;if(a!==undefined){this.isPrevious=Array.isArray(i)?i.includes(a):i===a}s=this.getPreviousSibling();c=s===null||s===void 0?void 0:s.value;if(c!==undefined){this.isNext=Array.isArray(i)?i.includes(c):i===c}}return[2]}))}))};this.getNextSibling=function(){if(!e.el){return}var n=e.el.nextElementSibling;if((n===null||n===void 0?void 0:n.tagName)!=="ION-ACCORDION"){return}return n};this.getPreviousSibling=function(){if(!e.el){return}var n=e.el.previousElementSibling;if((n===null||n===void 0?void 0:n.tagName)!=="ION-ACCORDION"){return}return n};this.state=1;this.isNext=false;this.isPrevious=false;this.value="ion-accordion-".concat(accordionIds++);this.disabled=false;this.readonly=false;this.toggleIcon=chevronDown;this.toggleIconSlot="end"}n.prototype.valueChanged=function(){this.updateState()};n.prototype.connectedCallback=function(){var n;var e=this.accordionGroupEl=(n=this.el)===null||n===void 0?void 0:n.closest("ion-accordion-group");if(e){this.updateState(true);addEventListener(e,"ionValueChange",this.updateListener)}};n.prototype.disconnectedCallback=function(){var n=this.accordionGroupEl;if(n){removeEventListener(n,"ionValueChange",this.updateListener)}};n.prototype.componentDidLoad=function(){var n=this;this.setItemDefaults();this.slotToggleIcon();raf((function(){var e=n.state===4||n.state===8;n.setAria(e)}))};n.prototype.toggleExpanded=function(){var n=this,e=n.accordionGroupEl,t=n.disabled,i=n.readonly,r=n.value,o=n.state;if(t||i)return;if(e){var a=o===1||o===2;e.requestAccordionToggle(r,a)}};n.prototype.render=function(){var n;var e=this;var t=this,i=t.disabled,r=t.readonly;var o=getIonMode(this);var a=this.state===4||this.state===8;var s=a?"header expanded":"header";var c=a?"content expanded":"content";this.setAria(a);return h(Host,{key:"073e1d02c18dcbc20c68648426e87c14750c031d",class:(n={},n[o]=true,n["accordion-expanding"]=this.state===8,n["accordion-expanded"]=this.state===4,n["accordion-collapsing"]=this.state===2,n["accordion-collapsed"]=this.state===1,n["accordion-next"]=this.isNext,n["accordion-previous"]=this.isPrevious,n["accordion-disabled"]=i,n["accordion-readonly"]=r,n["accordion-animated"]=this.shouldAnimate(),n)},h("div",{key:"9b4cf326de8bb6b4033992903c0c1bfd7eea9bcc",onClick:function(){return e.toggleExpanded()},id:"header",part:s,"aria-controls":"content",ref:function(n){return e.headerEl=n}},h("slot",{key:"464c32a37f64655eacf4218284214f5f30b14a1e",name:"header"})),h("div",{key:"8bb52e6a62d7de0106b253201a89a32e79d9a594",id:"content",part:c,role:"region","aria-labelledby":"header",ref:function(n){return e.contentEl=n}},h("div",{key:"1d9dfd952ad493754aaeea7a8f625b33c2dd90a0",id:"content-wrapper",ref:function(n){return e.contentElWrapper=n}},h("slot",{key:"970dfbc55a612d739d0ca3b7b1a08e5c96d0c479",name:"content"}))))};Object.defineProperty(n,"delegatesFocus",{get:function(){return true},enumerable:false,configurable:true});Object.defineProperty(n.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(n,"watchers",{get:function(){return{value:["valueChanged"]}},enumerable:false,configurable:true});return n}();var accordionIds=0;Accordion.style={ios:IonAccordionIosStyle0,md:IonAccordionMdStyle0};var accordionGroupIosCss=":host{display:block}:host(.accordion-group-expand-inset){-webkit-margin-start:16px;margin-inline-start:16px;-webkit-margin-end:16px;margin-inline-end:16px;margin-top:16px;margin-bottom:16px}:host(.accordion-group-expand-inset) ::slotted(ion-accordion.accordion-expanding),:host(.accordion-group-expand-inset) ::slotted(ion-accordion.accordion-expanded){border-bottom:none}";var IonAccordionGroupIosStyle0=accordionGroupIosCss;var accordionGroupMdCss=":host{display:block}:host(.accordion-group-expand-inset){-webkit-margin-start:16px;margin-inline-start:16px;-webkit-margin-end:16px;margin-inline-end:16px;margin-top:16px;margin-bottom:16px}:host(.accordion-group-expand-inset) ::slotted(ion-accordion){-webkit-box-shadow:0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12);box-shadow:0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12)}:host(.accordion-group-expand-inset) ::slotted(ion-accordion.accordion-expanding),:host(.accordion-group-expand-inset) ::slotted(ion-accordion.accordion-expanded){margin-left:0;margin-right:0;margin-top:16px;margin-bottom:16px;border-radius:6px}:host(.accordion-group-expand-inset) ::slotted(ion-accordion.accordion-previous){border-end-end-radius:6px;border-end-start-radius:6px}:host(.accordion-group-expand-inset) ::slotted(ion-accordion.accordion-next){border-start-start-radius:6px;border-start-end-radius:6px}:host(.accordion-group-expand-inset) ::slotted(ion-accordion):first-of-type{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0}";var IonAccordionGroupMdStyle0=accordionGroupMdCss;var AccordionGroup=function(){function n(n){registerInstance(this,n);this.ionChange=createEvent(this,"ionChange",7);this.ionValueChange=createEvent(this,"ionValueChange",7);this.animated=true;this.multiple=undefined;this.value=undefined;this.disabled=false;this.readonly=false;this.expand="compact"}n.prototype.valueChanged=function(){var n=this,e=n.value,t=n.multiple;if(!t&&Array.isArray(e)){printIonWarning('ion-accordion-group was passed an array of values, but multiple="false". This is incorrect usage and may result in unexpected behaviors. To dismiss this warning, pass a string to the "value" property when multiple="false".\n\n Value Passed: ['.concat(e.map((function(n){return"'".concat(n,"'")})).join(", "),"]\n"),this.el)}this.ionValueChange.emit({value:this.value})};n.prototype.disabledChanged=function(){return __awaiter(this,void 0,void 0,(function(){var n,e,t,i,r;return __generator(this,(function(o){switch(o.label){case 0:n=this.disabled;return[4,this.getAccordions()];case 1:e=o.sent();for(t=0,i=e;t<i.length;t++){r=i[t];r.disabled=n}return[2]}}))}))};n.prototype.readonlyChanged=function(){return __awaiter(this,void 0,void 0,(function(){var n,e,t,i,r;return __generator(this,(function(o){switch(o.label){case 0:n=this.readonly;return[4,this.getAccordions()];case 1:e=o.sent();for(t=0,i=e;t<i.length;t++){r=i[t];r.readonly=n}return[2]}}))}))};n.prototype.onKeydown=function(n){return __awaiter(this,void 0,void 0,(function(){var e,t,i,r,o,a,s;return __generator(this,(function(c){switch(c.label){case 0:e=document.activeElement;if(!e){return[2]}t=e.closest('ion-accordion [slot="header"]');if(!t){return[2]}i=e.tagName==="ION-ACCORDION"?e:e.closest("ion-accordion");if(!i){return[2]}r=i.closest("ion-accordion-group");if(r!==this.el){return[2]}return[4,this.getAccordions()];case 1:o=c.sent();a=o.findIndex((function(n){return n===i}));if(a===-1){return[2]}if(n.key==="ArrowDown"){s=this.findNextAccordion(o,a)}else if(n.key==="ArrowUp"){s=this.findPreviousAccordion(o,a)}else if(n.key==="Home"){s=o[0]}else if(n.key==="End"){s=o[o.length-1]}if(s!==undefined&&s!==e){s.focus()}return[2]}}))}))};n.prototype.componentDidLoad=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(n){if(this.disabled){this.disabledChanged()}if(this.readonly){this.readonlyChanged()}this.valueChanged();return[2]}))}))};n.prototype.setValue=function(n){var e=this.value=n;this.ionChange.emit({value:e})};n.prototype.requestAccordionToggle=function(n,e){return __awaiter(this,void 0,void 0,(function(){var t,i,r,o,a,s,c,d,s,c;return __generator(this,(function(u){t=this,i=t.multiple,r=t.value,o=t.readonly,a=t.disabled;if(o||a){return[2]}if(e){if(i){s=r!==null&&r!==void 0?r:[];c=Array.isArray(s)?s:[s];d=c.find((function(e){return e===n}));if(d===undefined&&n!==undefined){this.setValue(__spreadArray(__spreadArray([],c,true),[n],false))}}else{this.setValue(n)}}else{if(i){s=r!==null&&r!==void 0?r:[];c=Array.isArray(s)?s:[s];this.setValue(c.filter((function(e){return e!==n})))}else{this.setValue(undefined)}}return[2]}))}))};n.prototype.findNextAccordion=function(n,e){var t=n[e+1];if(t===undefined){return n[0]}return t};n.prototype.findPreviousAccordion=function(n,e){var t=n[e-1];if(t===undefined){return n[n.length-1]}return t};n.prototype.getAccordions=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(n){return[2,Array.from(this.el.querySelectorAll(":scope > ion-accordion"))]}))}))};n.prototype.render=function(){var n;var e=this,t=e.disabled,i=e.readonly,r=e.expand;var o=getIonMode(this);return h(Host,{key:"82f3e77066fabb4736638ee4c487ad56efd39c63",class:(n={},n[o]=true,n["accordion-group-disabled"]=t,n["accordion-group-readonly"]=i,n["accordion-group-expand-".concat(r)]=true,n),role:"presentation"},h("slot",{key:"a3c791ea887fc640b512f81d429be465ae902b3d"}))};Object.defineProperty(n.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(n,"watchers",{get:function(){return{value:["valueChanged"],disabled:["disabledChanged"],readonly:["readonlyChanged"]}},enumerable:false,configurable:true});return n}();AccordionGroup.style={ios:IonAccordionGroupIosStyle0,md:IonAccordionGroupMdStyle0};export{Accordion as ion_accordion,AccordionGroup as ion_accordion_group};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* (C) Ionic http://ionicframework.com - MIT License
|
|
3
3
|
*/
|
|
4
|
-
import{r as registerInstance,d as createEvent,h,f as Host,i as getElement}from"./index-5dc2b88e.js";import{i as inheritAriaAttributes,d as renderHiddenInput}from"./helpers-da915de8.js";import{c as createColorClasses,h as hostContext}from"./theme-01f3f29c.js";import{b as getIonMode}from"./ionic-global-d2d8f882.js";var checkboxIosCss=":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]){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;height:inherit;cursor:inherit}.label-text-wrapper{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}:host(.in-item) .label-text-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-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}";var IonCheckboxIosStyle0=checkboxIosCss;var checkboxMdCss=":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]){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;height:inherit;cursor:inherit}.label-text-wrapper{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}:host(.in-item) .label-text-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-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}";var IonCheckboxMdStyle0=checkboxMdCss;var Checkbox=function(){function e(e){var t=this;registerInstance(this,e);this.ionChange=createEvent(this,"ionChange",7);this.ionFocus=createEvent(this,"ionFocus",7);this.ionBlur=createEvent(this,"ionBlur",7);this.inputId="ion-cb-".concat(checkboxIds++);this.inheritedAttributes={};this.setChecked=function(e){var r=t.checked=e;t.ionChange.emit({checked:r,value:t.value})};this.toggleChecked=function(e){e.preventDefault();t.setFocus();t.setChecked(!t.checked);t.indeterminate=false};this.onFocus=function(){t.ionFocus.emit()};this.onBlur=function(){t.ionBlur.emit()};this.onClick=function(e){if(t.disabled){return}t.toggleChecked(e)};this.color=undefined;this.name=this.inputId;this.checked=false;this.indeterminate=false;this.disabled=false;this.value="on";this.labelPlacement="start";this.justify="space-between";this.alignment="center"}e.prototype.componentWillLoad=function(){this.inheritedAttributes=Object.assign({},inheritAriaAttributes(this.el))};e.prototype.setFocus=function(){if(this.focusEl){this.focusEl.focus()}};e.prototype.render=function(){var e;var t=this;var r=this,o=r.color,c=r.checked,a=r.disabled,i=r.el,n=r.getSVGPath,s=r.indeterminate,l=r.inheritedAttributes,b=r.inputId,p=r.justify,x=r.labelPlacement,d=r.name,k=r.value,m=r.alignment;var f=getIonMode(this);var g=n(f,s);renderHiddenInput(true,i,d,c?k:"",a);return h(Host,{key:"52064869f18f6762802a783ba9ee37433d2a2981","aria-checked":s?"mixed":"".concat(c),class:createColorClasses(o,(e={},e[f]=true,e["in-item"]=hostContext("ion-item",i),e["checkbox-checked"]=c,e["checkbox-disabled"]=a,e["checkbox-indeterminate"]=s,e.interactive=true,e["checkbox-justify-".concat(p)]=true,e["checkbox-alignment-".concat(m)]=true,e["checkbox-label-placement-".concat(x)]=true,e)),onClick:this.onClick},h("label",{key:"800b3521fe809423b9eee7ab9d220255cc6ffdff",class:"checkbox-wrapper"},h("input",Object.assign({key:"3e254b29bb1fc3951691a255a20cfd65360be510",type:"checkbox",checked:c?true:undefined,disabled:a,id:b,onChange:this.toggleChecked,onFocus:function(){return t.onFocus()},onBlur:function(){return t.onBlur()},ref:function(e){return t.focusEl=e}},l)),h("div",{key:"19ff4b1115c3bc9c2ceed045fbc4e970f77d9e0d",class:{"label-text-wrapper":true,"label-text-wrapper-hidden":i.textContent===""},part:"label"},h("slot",{key:"e4f07b55826fb1b3a80e0428873fbdf06bf92978"})),h("div",{key:"5134cf088c93f36b00d3848b573a148f2d9fb806",class:"native-wrapper"},h("svg",{key:"d00733f071d6da47e1a6e5c89cb6aab1a7b0ef74",class:"checkbox-icon",viewBox:"0 0 24 24",part:"container"},g))))};e.prototype.getSVGPath=function(e,t){var r=t?h("path",{d:"M6 12L18 12",part:"mark"}):h("path",{d:"M5.9,12.5l3.8,3.8l8.8-8.8",part:"mark"});if(e==="md"){r=t?h("path",{d:"M2 12H22",part:"mark"}):h("path",{d:"M1.73,12.91 8.1,19.28 22.79,4.59",part:"mark"})}return r};Object.defineProperty(e.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});return e}();var checkboxIds=0;Checkbox.style={ios:IonCheckboxIosStyle0,md:IonCheckboxMdStyle0};export{Checkbox as ion_checkbox};
|
|
4
|
+
import{r as registerInstance,d as createEvent,h,f as Host,i as getElement}from"./index-5dc2b88e.js";import{i as inheritAriaAttributes,d as renderHiddenInput}from"./helpers-da915de8.js";import{c as createColorClasses,h as hostContext}from"./theme-01f3f29c.js";import{b as getIonMode}from"./ionic-global-d2d8f882.js";var checkboxIosCss=":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]){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;height:inherit;cursor:inherit}.label-text-wrapper{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}:host(.in-item) .label-text-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-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}";var IonCheckboxIosStyle0=checkboxIosCss;var checkboxMdCss=":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]){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;height:inherit;cursor:inherit}.label-text-wrapper{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}:host(.in-item) .label-text-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-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}";var IonCheckboxMdStyle0=checkboxMdCss;var Checkbox=function(){function e(e){var t=this;registerInstance(this,e);this.ionChange=createEvent(this,"ionChange",7);this.ionFocus=createEvent(this,"ionFocus",7);this.ionBlur=createEvent(this,"ionBlur",7);this.inputId="ion-cb-".concat(checkboxIds++);this.inheritedAttributes={};this.setChecked=function(e){var r=t.checked=e;t.ionChange.emit({checked:r,value:t.value})};this.toggleChecked=function(e){e.preventDefault();t.setFocus();t.setChecked(!t.checked);t.indeterminate=false};this.onFocus=function(){t.ionFocus.emit()};this.onBlur=function(){t.ionBlur.emit()};this.onClick=function(e){if(t.disabled){return}t.toggleChecked(e)};this.color=undefined;this.name=this.inputId;this.checked=false;this.indeterminate=false;this.disabled=false;this.value="on";this.labelPlacement="start";this.justify="space-between";this.alignment="center"}e.prototype.componentWillLoad=function(){this.inheritedAttributes=Object.assign({},inheritAriaAttributes(this.el))};e.prototype.setFocus=function(){if(this.focusEl){this.focusEl.focus()}};e.prototype.render=function(){var e;var t=this;var r=this,o=r.color,c=r.checked,a=r.disabled,i=r.el,n=r.getSVGPath,s=r.indeterminate,l=r.inheritedAttributes,b=r.inputId,p=r.justify,x=r.labelPlacement,d=r.name,k=r.value,m=r.alignment;var f=getIonMode(this);var g=n(f,s);renderHiddenInput(true,i,d,c?k:"",a);return h(Host,{key:"0ac95890562c7f035704c40959c69f8c8ca4bc9f","aria-checked":s?"mixed":"".concat(c),class:createColorClasses(o,(e={},e[f]=true,e["in-item"]=hostContext("ion-item",i),e["checkbox-checked"]=c,e["checkbox-disabled"]=a,e["checkbox-indeterminate"]=s,e.interactive=true,e["checkbox-justify-".concat(p)]=true,e["checkbox-alignment-".concat(m)]=true,e["checkbox-label-placement-".concat(x)]=true,e)),onClick:this.onClick},h("label",{key:"3f9f7c8383dded8f7997086b25399d052df76b5c",class:"checkbox-wrapper"},h("input",Object.assign({key:"6fb11d06c424c289357d5d7c1a4d1b967be231d0",type:"checkbox",checked:c?true:undefined,disabled:a,id:b,onChange:this.toggleChecked,onFocus:function(){return t.onFocus()},onBlur:function(){return t.onBlur()},ref:function(e){return t.focusEl=e}},l)),h("div",{key:"f577a272e5e3f9f1852fc95e40466c80b76309c7",class:{"label-text-wrapper":true,"label-text-wrapper-hidden":i.textContent===""},part:"label"},h("slot",{key:"7c9b0b4513e797a1acdf55a5f286563e5f397e9c"})),h("div",{key:"e47c50a078b8d761ddc5efcb9a9635281b5818f6",class:"native-wrapper"},h("svg",{key:"4dca47179ae15e9094e01c799ef4ed25fbb0d840",class:"checkbox-icon",viewBox:"0 0 24 24",part:"container"},g))))};e.prototype.getSVGPath=function(e,t){var r=t?h("path",{d:"M6 12L18 12",part:"mark"}):h("path",{d:"M5.9,12.5l3.8,3.8l8.8-8.8",part:"mark"});if(e==="md"){r=t?h("path",{d:"M2 12H22",part:"mark"}):h("path",{d:"M1.73,12.91 8.1,19.28 22.79,4.59",part:"mark"})}return r};Object.defineProperty(e.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});return e}();var checkboxIds=0;Checkbox.style={ios:IonCheckboxIosStyle0,md:IonCheckboxMdStyle0};export{Checkbox as ion_checkbox};
|