@ionic/core 8.8.5-dev.11776871786.1e73ab78 → 8.8.5-dev.11777476461.1fd79771
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/ion-modal.js +1 -1
- package/components/ion-radio-group.js +1 -1
- package/components/ion-select-modal.js +1 -1
- package/components/ion-select-popover.js +1 -1
- package/components/ion-select.js +1 -1
- package/components/p-BlNv564p.js +4 -0
- package/components/p-D-cP12ZN.js +4 -0
- package/components/{p-BZfgPT2N.js → p-DUqnmRFi.js} +1 -1
- package/components/{p-Bk2zuNWT.js → p-DvOO1fxp.js} +1 -1
- package/dist/cjs/ion-modal.cjs.entry.js +10 -4
- package/dist/cjs/ion-radio_2.cjs.entry.js +13 -1
- package/dist/cjs/ion-select-modal.cjs.entry.js +18 -7
- package/dist/cjs/ion-select_3.cjs.entry.js +18 -7
- package/dist/collection/components/content/content.css +0 -6
- package/dist/collection/components/modal/modal.js +10 -4
- package/dist/collection/components/radio-group/radio-group.js +13 -1
- package/dist/collection/components/radio-group/test/fixtures.js +2 -2
- package/dist/collection/components/select-modal/select-modal.js +18 -7
- package/dist/collection/components/select-modal/test/fixtures.js +4 -0
- package/dist/collection/components/select-popover/select-popover.js +18 -7
- package/dist/collection/components/select-popover/test/fixtures.js +4 -0
- package/dist/docs.json +1 -6
- package/dist/esm/ion-modal.entry.js +10 -4
- package/dist/esm/ion-radio_2.entry.js +13 -1
- package/dist/esm/ion-select-modal.entry.js +18 -7
- package/dist/esm/ion-select_3.entry.js +18 -7
- package/dist/ionic/ionic.esm.js +1 -1
- package/dist/ionic/p-28a9e720.entry.js +4 -0
- package/dist/ionic/{p-4dd5e8e0.entry.js → p-8fda6a62.entry.js} +1 -1
- package/dist/ionic/{p-9eac4eb1.entry.js → p-aa812c4b.entry.js} +1 -1
- package/dist/ionic/{p-4eedd78a.entry.js → p-e0287f41.entry.js} +1 -1
- package/dist/types/components/modal/modal.d.ts +6 -0
- package/dist/types/components/radio-group/test/fixtures.d.ts +1 -1
- package/dist/types/components/select-modal/select-modal.d.ts +1 -0
- package/dist/types/components/select-modal/test/fixtures.d.ts +1 -0
- package/dist/types/components/select-popover/select-popover.d.ts +1 -0
- package/dist/types/components/select-popover/test/fixtures.d.ts +1 -0
- package/hydrate/index.js +59 -19
- package/hydrate/index.mjs +59 -19
- package/package.json +1 -1
- package/components/p-EK4xUz-q.js +0 -4
- package/components/p-MlJRD6E1.js +0 -4
- package/dist/ionic/p-e6c5f060.entry.js +0 -4
package/hydrate/index.mjs
CHANGED
|
@@ -26256,6 +26256,12 @@ class Modal {
|
|
|
26256
26256
|
* when no footer is present, so ion-content's .inner-scroll includes
|
|
26257
26257
|
* safe-area-bottom in its scroll padding. This keeps the modal background
|
|
26258
26258
|
* edge-to-edge while ensuring content scrolls clear of the system nav bar.
|
|
26259
|
+
*
|
|
26260
|
+
* --ion-content-safe-area-padding-bottom is an internal CSS property used
|
|
26261
|
+
* only by this code path. It is not part of ion-content's public API and
|
|
26262
|
+
* should not be set by consumers. The default of 0px makes it a no-op
|
|
26263
|
+
* when unset, which is the expected state for ion-content used outside of
|
|
26264
|
+
* a fullscreen modal without a footer.
|
|
26259
26265
|
*/
|
|
26260
26266
|
applyFullscreenSafeAreaTo(contentEl, hasFooter) {
|
|
26261
26267
|
// Only apply for standard Ionic layouts (has ion-content but no
|
|
@@ -26320,20 +26326,20 @@ class Modal {
|
|
|
26320
26326
|
const isCardModal = presentingElement !== undefined && mode === 'ios';
|
|
26321
26327
|
const isHandleCycle = handleBehavior === 'cycle';
|
|
26322
26328
|
const isSheetModalWithHandle = isSheetModal && showHandle;
|
|
26323
|
-
return (hAsync(Host, Object.assign({ key: '
|
|
26329
|
+
return (hAsync(Host, Object.assign({ key: '4bf38aa67df9a3f977163bba5423960bbafd16de', "no-router": true,
|
|
26324
26330
|
// Allow the modal to be navigable when the handle is focusable
|
|
26325
26331
|
tabIndex: isHandleCycle && isSheetModalWithHandle ? 0 : -1 }, htmlAttributes, { style: {
|
|
26326
26332
|
zIndex: `${20000 + this.overlayIndex}`,
|
|
26327
|
-
}, class: Object.assign({ [mode]: true, ['modal-default']: !isCardModal && !isSheetModal, [`modal-card`]: isCardModal, [`modal-sheet`]: isSheetModal, [`modal-no-expand-scroll`]: isSheetModal && !expandToScroll, 'overlay-hidden': true, [FOCUS_TRAP_DISABLE_CLASS]: focusTrap === false }, getClassMap(this.cssClass)), onIonBackdropTap: this.onBackdropTap, onIonModalDidPresent: this.onLifecycle, onIonModalWillPresent: this.onLifecycle, onIonModalWillDismiss: this.onLifecycle, onIonModalDidDismiss: this.onLifecycle, onFocus: this.onModalFocus }), hAsync("ion-backdrop", { key: '
|
|
26333
|
+
}, class: Object.assign({ [mode]: true, ['modal-default']: !isCardModal && !isSheetModal, [`modal-card`]: isCardModal, [`modal-sheet`]: isSheetModal, [`modal-no-expand-scroll`]: isSheetModal && !expandToScroll, 'overlay-hidden': true, [FOCUS_TRAP_DISABLE_CLASS]: focusTrap === false }, getClassMap(this.cssClass)), onIonBackdropTap: this.onBackdropTap, onIonModalDidPresent: this.onLifecycle, onIonModalWillPresent: this.onLifecycle, onIonModalWillDismiss: this.onLifecycle, onIonModalDidDismiss: this.onLifecycle, onFocus: this.onModalFocus }), hAsync("ion-backdrop", { key: '866da40cc5fc8d3e36637098fb3066a5bc9f4e0f', ref: (el) => (this.backdropEl = el), visible: this.showBackdrop, tappable: this.backdropDismiss, part: "backdrop" }), mode === 'ios' && hAsync("div", { key: '5a2a05514ea8592c8feb0465e504aa7c7af17963', class: "modal-shadow" }), hAsync("div", Object.assign({ key: '4d327115306451f57d190b06ab8cbb6191a6f1d7',
|
|
26328
26334
|
/*
|
|
26329
26335
|
role and aria-modal must be used on the
|
|
26330
26336
|
same element. They must also be set inside the
|
|
26331
26337
|
shadow DOM otherwise ion-button will not be highlighted
|
|
26332
26338
|
when using VoiceOver: https://bugs.webkit.org/show_bug.cgi?id=247134
|
|
26333
26339
|
*/
|
|
26334
|
-
role: "dialog" }, inheritedAttributes, { "aria-modal": "true", class: "modal-wrapper ion-overlay-wrapper", part: "content", ref: (el) => (this.wrapperEl = el) }), showHandle && (hAsync("button", { key: '
|
|
26340
|
+
role: "dialog" }, inheritedAttributes, { "aria-modal": "true", class: "modal-wrapper ion-overlay-wrapper", part: "content", ref: (el) => (this.wrapperEl = el) }), showHandle && (hAsync("button", { key: 'd1882835cc049232c0d957e3ba1e79676a07d179', class: "modal-handle",
|
|
26335
26341
|
// Prevents the handle from receiving keyboard focus when it does not cycle
|
|
26336
|
-
tabIndex: !isHandleCycle ? -1 : 0, "aria-label": "Activate to adjust the size of the dialog overlaying the screen", onClick: isHandleCycle ? this.onHandleClick : undefined, part: "handle", ref: (el) => (this.dragHandleEl = el) })), hAsync("slot", { key: '
|
|
26342
|
+
tabIndex: !isHandleCycle ? -1 : 0, "aria-label": "Activate to adjust the size of the dialog overlaying the screen", onClick: isHandleCycle ? this.onHandleClick : undefined, part: "handle", ref: (el) => (this.dragHandleEl = el) })), hAsync("slot", { key: '81dc58b09cf7d7022b04cd170f53113604364d5e', onSlotchange: this.onSlotChange }))));
|
|
26337
26343
|
}
|
|
26338
26344
|
get el() { return getElement(this); }
|
|
26339
26345
|
static get watchers() { return {
|
|
@@ -31346,6 +31352,18 @@ class RadioGroup {
|
|
|
31346
31352
|
// to the bottom of the screen
|
|
31347
31353
|
ev.preventDefault();
|
|
31348
31354
|
}
|
|
31355
|
+
// Inside a select interface, Enter commits the focused radio
|
|
31356
|
+
// value (matching native <select>). The !ev.repeat guard stops
|
|
31357
|
+
// a held Enter on the triggering ion-select from re-committing
|
|
31358
|
+
// once focus lands in the opened popover/modal.
|
|
31359
|
+
if (ev.key === 'Enter' && inSelectInterface && !ev.repeat) {
|
|
31360
|
+
const previousValue = this.value;
|
|
31361
|
+
this.value = current.value;
|
|
31362
|
+
if (previousValue !== this.value) {
|
|
31363
|
+
this.emitValueChange(ev);
|
|
31364
|
+
}
|
|
31365
|
+
ev.preventDefault();
|
|
31366
|
+
}
|
|
31349
31367
|
}
|
|
31350
31368
|
}
|
|
31351
31369
|
/** @internal */
|
|
@@ -31378,7 +31396,7 @@ class RadioGroup {
|
|
|
31378
31396
|
const { label, labelId, el, name, value } = this;
|
|
31379
31397
|
const mode = getIonMode$1(this);
|
|
31380
31398
|
renderHiddenInput(true, el, name, value, false);
|
|
31381
|
-
return (hAsync(Host, { key: '
|
|
31399
|
+
return (hAsync(Host, { key: '377e4aa3a656cc84b742f9d7a7d4be65d20c69f5', role: "radiogroup", "aria-labelledby": label ? labelId : null, "aria-describedby": this.hintTextId, "aria-invalid": this.isInvalid ? 'true' : undefined, onClick: this.onClick, class: mode }, this.renderHintText(), hAsync("slot", { key: 'c3187a2497773b4f15cea3b413b036502bcec8c0' })));
|
|
31382
31400
|
}
|
|
31383
31401
|
get el() { return getElement(this); }
|
|
31384
31402
|
static get watchers() { return {
|
|
@@ -37467,6 +37485,10 @@ const selectModalMdCss = () => `.sc-ion-select-modal-md-h{height:100%}ion-list.s
|
|
|
37467
37485
|
class SelectModal {
|
|
37468
37486
|
constructor(hostRef) {
|
|
37469
37487
|
registerInstance(this, hostRef);
|
|
37488
|
+
// Tracks the option that received Enter-keydown so keyup only
|
|
37489
|
+
// dismisses when the press started on the same option. Prevents
|
|
37490
|
+
// Enter on the triggering ion-select from auto-dismissing.
|
|
37491
|
+
this.pendingEnterTarget = null;
|
|
37470
37492
|
/**
|
|
37471
37493
|
* The text to display on the cancel button.
|
|
37472
37494
|
*/
|
|
@@ -37516,15 +37538,22 @@ class SelectModal {
|
|
|
37516
37538
|
return (hAsync("ion-radio-group", { value: checked, onIonChange: (ev) => this.callOptionHandler(ev) }, this.options.map((option) => (hAsync("ion-item", { lines: "none", class: Object.assign({
|
|
37517
37539
|
// TODO FW-4784
|
|
37518
37540
|
'item-radio-checked': option.value === checked
|
|
37519
|
-
}, getClassMap(option.cssClass)) }, hAsync("ion-radio", { value: option.value, disabled: option.disabled, justify: "start", labelPlacement: "end", onClick: () => this.closeModal(),
|
|
37541
|
+
}, getClassMap(option.cssClass)) }, hAsync("ion-radio", { value: option.value, disabled: option.disabled, justify: "start", labelPlacement: "end", onClick: () => this.closeModal(), onKeyDown: (ev) => {
|
|
37542
|
+
if (ev.key === 'Enter' && !ev.repeat) {
|
|
37543
|
+
this.pendingEnterTarget = ev.currentTarget;
|
|
37544
|
+
}
|
|
37545
|
+
}, onKeyUp: (ev) => {
|
|
37520
37546
|
if (ev.key === ' ') {
|
|
37521
|
-
|
|
37522
|
-
* Selecting a radio option with keyboard navigation,
|
|
37523
|
-
* either through the Enter or Space keys, should
|
|
37524
|
-
* dismiss the modal.
|
|
37525
|
-
*/
|
|
37547
|
+
// Space selects and dismisses in one press.
|
|
37526
37548
|
this.closeModal();
|
|
37527
37549
|
}
|
|
37550
|
+
else if (ev.key === 'Enter') {
|
|
37551
|
+
const shouldClose = this.pendingEnterTarget === ev.currentTarget;
|
|
37552
|
+
this.pendingEnterTarget = null;
|
|
37553
|
+
if (shouldClose) {
|
|
37554
|
+
this.closeModal();
|
|
37555
|
+
}
|
|
37556
|
+
}
|
|
37528
37557
|
} }, option.text))))));
|
|
37529
37558
|
}
|
|
37530
37559
|
renderCheckboxOptions() {
|
|
@@ -37537,7 +37566,7 @@ class SelectModal {
|
|
|
37537
37566
|
} }, option.text))));
|
|
37538
37567
|
}
|
|
37539
37568
|
render() {
|
|
37540
|
-
return (hAsync(Host, { key: '
|
|
37569
|
+
return (hAsync(Host, { key: 'fda0bf6f93cd5ec9f3c64f88a52de849e0e140a2', class: getIonMode$1(this) }, hAsync("ion-header", { key: '27c0b17175a53db9ff159feeeb96451a3f011dab' }, hAsync("ion-toolbar", { key: '91a4155ebc317fbc9f1bb3e26a7e94754b953c9b' }, this.header !== undefined && hAsync("ion-title", { key: 'f6dae8e4e381f322cc90efefd9bb6ef81d4d2f3e' }, this.header), hAsync("ion-buttons", { key: 'e7760532fb2e7e7385ed6e62097d92d96ff20148', slot: "end" }, hAsync("ion-button", { key: '4999b6fc46cba138186546dca67b7950855e6fb7', onClick: () => this.closeModal() }, this.cancelText)))), hAsync("ion-content", { key: 'c73f80a4bc25b9061ea65cf11e5d811c1a4d8704' }, hAsync("ion-list", { key: 'b21905d15b36ad5eb45845e768918d2763cf48b1' }, this.multiple === true ? this.renderCheckboxOptions() : this.renderRadioOptions()))));
|
|
37541
37570
|
}
|
|
37542
37571
|
get el() { return getElement(this); }
|
|
37543
37572
|
static get style() { return {
|
|
@@ -37600,6 +37629,10 @@ const selectPopoverMdCss = () => `.sc-ion-select-popover-md-h ion-list.sc-ion-se
|
|
|
37600
37629
|
class SelectPopover {
|
|
37601
37630
|
constructor(hostRef) {
|
|
37602
37631
|
registerInstance(this, hostRef);
|
|
37632
|
+
// Tracks the option that received Enter-keydown so keyup only
|
|
37633
|
+
// dismisses when the press started on the same option. Prevents
|
|
37634
|
+
// Enter on the triggering ion-select from auto-dismissing.
|
|
37635
|
+
this.pendingEnterTarget = null;
|
|
37603
37636
|
/**
|
|
37604
37637
|
* An array of options for the popover
|
|
37605
37638
|
*/
|
|
@@ -37675,21 +37708,28 @@ class SelectPopover {
|
|
|
37675
37708
|
return (hAsync("ion-radio-group", { value: checked, onIonChange: (ev) => this.callOptionHandler(ev) }, options.map((option) => (hAsync("ion-item", { class: Object.assign({
|
|
37676
37709
|
// TODO FW-4784
|
|
37677
37710
|
'item-radio-checked': option.value === checked
|
|
37678
|
-
}, getClassMap(option.cssClass)) }, hAsync("ion-radio", { value: option.value, disabled: option.disabled, onClick: () => this.dismissParentPopover(),
|
|
37711
|
+
}, getClassMap(option.cssClass)) }, hAsync("ion-radio", { value: option.value, disabled: option.disabled, onClick: () => this.dismissParentPopover(), onKeyDown: (ev) => {
|
|
37712
|
+
if (ev.key === 'Enter' && !ev.repeat) {
|
|
37713
|
+
this.pendingEnterTarget = ev.currentTarget;
|
|
37714
|
+
}
|
|
37715
|
+
}, onKeyUp: (ev) => {
|
|
37679
37716
|
if (ev.key === ' ') {
|
|
37680
|
-
|
|
37681
|
-
* Selecting a radio option with keyboard navigation,
|
|
37682
|
-
* either through the Enter or Space keys, should
|
|
37683
|
-
* dismiss the popover.
|
|
37684
|
-
*/
|
|
37717
|
+
// Space selects and dismisses in one press.
|
|
37685
37718
|
this.dismissParentPopover();
|
|
37686
37719
|
}
|
|
37720
|
+
else if (ev.key === 'Enter') {
|
|
37721
|
+
const shouldDismiss = this.pendingEnterTarget === ev.currentTarget;
|
|
37722
|
+
this.pendingEnterTarget = null;
|
|
37723
|
+
if (shouldDismiss) {
|
|
37724
|
+
this.dismissParentPopover();
|
|
37725
|
+
}
|
|
37726
|
+
}
|
|
37687
37727
|
} }, option.text))))));
|
|
37688
37728
|
}
|
|
37689
37729
|
render() {
|
|
37690
37730
|
const { header, message, options, subHeader } = this;
|
|
37691
37731
|
const hasSubHeaderOrMessage = subHeader !== undefined || message !== undefined;
|
|
37692
|
-
return (hAsync(Host, { key: '
|
|
37732
|
+
return (hAsync(Host, { key: 'e7449a1ecfcdbf45a79f8e26a00253c4e146448a', class: getIonMode$1(this) }, hAsync("ion-list", { key: '52abdfc8668c3429a0dcefef8ddedb6647fdd894' }, header !== undefined && hAsync("ion-list-header", { key: '978e5c03728756feafcc60a0e10e6ec59bf2ae11' }, header), hasSubHeaderOrMessage && (hAsync("ion-item", { key: 'e93c44e7f07a76def16e4b11f0fb4780d84ed402' }, hAsync("ion-label", { key: 'bba1aac43b0bc7f4f00978dd8301985233f3725c', class: "ion-text-wrap" }, subHeader !== undefined && hAsync("h3", { key: 'ad96f6017cf2cc5219540bded2c4f1ca3b532de2' }, subHeader), message !== undefined && hAsync("p", { key: '3fd038921dc40c4d0c29734433984b279ccaeec3' }, message)))), this.renderOptions(options))));
|
|
37693
37733
|
}
|
|
37694
37734
|
get el() { return getElement(this); }
|
|
37695
37735
|
static get style() { return {
|
package/package.json
CHANGED
package/components/p-EK4xUz-q.js
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* (C) Ionic http://ionicframework.com - MIT License
|
|
3
|
-
*/
|
|
4
|
-
import{p as o,H as e,h as i,i as t,d as s,t as r}from"./p-BJoMtgfR.js";import{s as n}from"./p-Cq8cQ0NL.js";import{g as a}from"./p-DiVJyqlX.js";import{b as c}from"./p-CDfQnFrd.js";import{d as p}from"./p-SBseW5KJ.js";import{d as m}from"./p-YLXPWgVj.js";import{d as l}from"./p-kvaDs24J.js";import{d}from"./p-B6FQ0cKR.js";import{d as b}from"./p-DYdpXONG.js";import{d as h}from"./p-BagjAGC0.js";import{d as f}from"./p-BSB38Tek.js";import{d as u}from"./p-Bk2zuNWT.js";import{d as v}from"./p-fpbh6w3f.js";const g=o(class extends e{constructor(o){super(),!1!==o&&this.__registerHost(),this.options=[]}findOptionFromEvent(o){const{options:e}=this;return e.find((e=>e.value===o.target.value))}callOptionHandler(o){const e=this.findOptionFromEvent(o),i=this.getValues(o);(null==e?void 0:e.handler)&&n(e.handler,i)}dismissParentPopover(){const o=this.el.closest("ion-popover");o&&o.dismiss()}setChecked(o){const{multiple:e}=this,i=this.findOptionFromEvent(o);e&&i&&(i.checked=o.detail.checked)}getValues(o){const{multiple:e,options:i}=this;if(e)return i.filter((o=>o.checked)).map((o=>o.value));const t=this.findOptionFromEvent(o);return t?t.value:void 0}renderOptions(o){const{multiple:e}=this;return!0===e?this.renderCheckboxOptions(o):this.renderRadioOptions(o)}renderCheckboxOptions(o){return o.map((o=>i("ion-item",{class:Object.assign({"item-checkbox-checked":o.checked},a(o.cssClass))},i("ion-checkbox",{value:o.value,disabled:o.disabled,checked:o.checked,justify:"start",labelPlacement:"end",onIonChange:o=>{this.setChecked(o),this.callOptionHandler(o),t(this)}},o.text))))}renderRadioOptions(o){const e=o.filter((o=>o.checked)).map((o=>o.value))[0];return i("ion-radio-group",{value:e,onIonChange:o=>this.callOptionHandler(o)},o.map((o=>i("ion-item",{class:Object.assign({"item-radio-checked":o.value===e},a(o.cssClass))},i("ion-radio",{value:o.value,disabled:o.disabled,onClick:()=>this.dismissParentPopover(),onKeyUp:o=>{" "===o.key&&this.dismissParentPopover()}},o.text)))))}render(){const{header:o,message:e,options:t,subHeader:r}=this,n=void 0!==r||void 0!==e;return i(s,{key:"0c9845a40d3fc392b0a7d64e2a6ed27d94bb7634",class:c(this)},i("ion-list",{key:"84a30f6661b0f8c00e6fa199658ed2adbcf27358"},void 0!==o&&i("ion-list-header",{key:"13f5f56bbfbc06751fa516291a2da72629b60ece"},o),n&&i("ion-item",{key:"3d39d18e720e798bbde334e79e6832091c7dfb81"},i("ion-label",{key:"d3051b0d140120b44bf5e79572f6f287e7cfb03a",class:"ion-text-wrap"},void 0!==r&&i("h3",{key:"b16805956f3316f8ec703c123b76f717488e8637"},r),void 0!==e&&i("p",{key:"2215ac4ab4146a14e75a79192e319a8016286b5f"},e))),this.renderOptions(t)))}get el(){return this}static get style(){return{ios:".sc-ion-select-popover-ios-h ion-list.sc-ion-select-popover-ios{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0}ion-list-header.sc-ion-select-popover-ios,ion-label.sc-ion-select-popover-ios{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0}.sc-ion-select-popover-ios-h{overflow-y:auto}",md:'.sc-ion-select-popover-md-h ion-list.sc-ion-select-popover-md{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0}ion-list-header.sc-ion-select-popover-md,ion-label.sc-ion-select-popover-md{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0}.sc-ion-select-popover-md-h{overflow-y:auto}ion-list.sc-ion-select-popover-md ion-radio.sc-ion-select-popover-md::part(container),ion-list.sc-ion-select-popover-md ion-radio.sc-ion-select-popover-md [part~="container"]{display:none}ion-list.sc-ion-select-popover-md ion-radio.sc-ion-select-popover-md::part(label),ion-list.sc-ion-select-popover-md ion-radio.sc-ion-select-popover-md [part~="label"]{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0}ion-item.sc-ion-select-popover-md{--inner-border-width:0}.item-radio-checked.sc-ion-select-popover-md{--background:rgba(var(--ion-color-primary-rgb, 0, 84, 233), 0.08);--background-focused:var(--ion-color-primary, #0054e9);--background-focused-opacity:0.2;--background-hover:var(--ion-color-primary, #0054e9);--background-hover-opacity:0.12}.item-checkbox-checked.sc-ion-select-popover-md{--background-activated:var(--ion-item-color, var(--ion-text-color, #000));--background-focused:var(--ion-item-color, var(--ion-text-color, #000));--background-hover:var(--ion-item-color, var(--ion-text-color, #000));--color:var(--ion-color-primary, #0054e9)}'}}},[34,"ion-select-popover",{header:[1],subHeader:[1,"sub-header"],message:[1],multiple:[4],options:[16]}]);function k(){"undefined"!=typeof customElements&&["ion-select-popover","ion-checkbox","ion-icon","ion-item","ion-label","ion-list","ion-list-header","ion-radio","ion-radio-group","ion-ripple-effect"].forEach((o=>{switch(o){case"ion-select-popover":customElements.get(r(o))||customElements.define(r(o),g);break;case"ion-checkbox":customElements.get(r(o))||p();break;case"ion-icon":customElements.get(r(o))||m();break;case"ion-item":customElements.get(r(o))||l();break;case"ion-label":customElements.get(r(o))||d();break;case"ion-list":customElements.get(r(o))||b();break;case"ion-list-header":customElements.get(r(o))||h();break;case"ion-radio":customElements.get(r(o))||f();break;case"ion-radio-group":customElements.get(r(o))||u();break;case"ion-ripple-effect":customElements.get(r(o))||v()}}))}export{g as S,k as d}
|
package/components/p-MlJRD6E1.js
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* (C) Ionic http://ionicframework.com - MIT License
|
|
3
|
-
*/
|
|
4
|
-
import{p as o,H as e,h as i,i as t,d as n,t as c}from"./p-BJoMtgfR.js";import{b as a}from"./p-CDfQnFrd.js";import{s}from"./p-Cq8cQ0NL.js";import{g as r}from"./p-DiVJyqlX.js";import{d as l}from"./p-BTeL5HCK.js";import{d}from"./p-B8b1Ukl9.js";import{d as m}from"./p-SBseW5KJ.js";import{d as b}from"./p-BGHGpkPX.js";import{d as p}from"./p-BYDc3hSE.js";import{d as h}from"./p-YLXPWgVj.js";import{d as u}from"./p-kvaDs24J.js";import{d as f}from"./p-DYdpXONG.js";import{d as k}from"./p-BSB38Tek.js";import{d as g}from"./p-Bk2zuNWT.js";import{d as v}from"./p-fpbh6w3f.js";import{d as y}from"./p-CgfaEEem.js";import{d as x}from"./p-DJMZehmW.js";const j=o(class extends e{constructor(o){super(),!1!==o&&this.__registerHost(),this.cancelText="Close",this.options=[]}closeModal(){const o=this.el.closest("ion-modal");o&&o.dismiss()}findOptionFromEvent(o){const{options:e}=this;return e.find((e=>e.value===o.target.value))}getValues(o){const{multiple:e,options:i}=this;if(e)return i.filter((o=>o.checked)).map((o=>o.value));const t=o?this.findOptionFromEvent(o):null;return t?t.value:void 0}callOptionHandler(o){const e=this.findOptionFromEvent(o),i=this.getValues(o);(null==e?void 0:e.handler)&&s(e.handler,i)}setChecked(o){const{multiple:e}=this,i=this.findOptionFromEvent(o);e&&i&&(i.checked=o.detail.checked)}renderRadioOptions(){const o=this.options.filter((o=>o.checked)).map((o=>o.value))[0];return i("ion-radio-group",{value:o,onIonChange:o=>this.callOptionHandler(o)},this.options.map((e=>i("ion-item",{lines:"none",class:Object.assign({"item-radio-checked":e.value===o},r(e.cssClass))},i("ion-radio",{value:e.value,disabled:e.disabled,justify:"start",labelPlacement:"end",onClick:()=>this.closeModal(),onKeyUp:o=>{" "===o.key&&this.closeModal()}},e.text)))))}renderCheckboxOptions(){return this.options.map((o=>i("ion-item",{class:Object.assign({"item-checkbox-checked":o.checked},r(o.cssClass))},i("ion-checkbox",{value:o.value,disabled:o.disabled,checked:o.checked,justify:"start",labelPlacement:"end",onIonChange:o=>{this.setChecked(o),this.callOptionHandler(o),t(this)}},o.text))))}render(){return i(n,{key:"f8a4cd6ff23ff01eaa1bdaf3c046814e7b30b23b",class:a(this)},i("ion-header",{key:"9e29a7e57ad5cf332641111882f16852187ec8ba"},i("ion-toolbar",{key:"e6af5d6eabbf4b10799fc8a0b8f91d29b12d41f5"},void 0!==this.header&&i("ion-title",{key:"6056e52d15dbf307571d25e0305d67228a79237d"},this.header),i("ion-buttons",{key:"c9aa4fb2e21a93f3a95c5a8f0ba8b7d5553c5a72",slot:"end"},i("ion-button",{key:"5ffbf512719bcb053b652fc96b1b6154d0593095",onClick:()=>this.closeModal()},this.cancelText)))),i("ion-content",{key:"0ec9098798a4e6de7a83a0a7e9d10bdcd7c98a78"},i("ion-list",{key:"d60b1700d3c2f8655951632de810900707a101f0"},!0===this.multiple?this.renderCheckboxOptions():this.renderRadioOptions())))}get el(){return this}static get style(){return{ionic:'.sc-ion-select-modal-ionic-h{height:100%}ion-list.sc-ion-select-modal-ionic ion-radio.sc-ion-select-modal-ionic::part(container),ion-list.sc-ion-select-modal-ionic ion-radio.sc-ion-select-modal-ionic [part~="container"]{display:none}ion-list.sc-ion-select-modal-ionic ion-radio.sc-ion-select-modal-ionic::part(label),ion-list.sc-ion-select-modal-ionic ion-radio.sc-ion-select-modal-ionic [part~="label"]{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0}ion-item.sc-ion-select-modal-ionic{--inner-border-width:0}.item-radio-checked.sc-ion-select-modal-ionic{--background:rgba(var(--ion-color-primary-rgb, 0, 84, 233), 0.08);--background-focused:var(--ion-color-primary, #0054e9);--background-focused-opacity:0.2;--background-hover:var(--ion-color-primary, #0054e9);--background-hover-opacity:0.12}.item-checkbox-checked.sc-ion-select-modal-ionic{--background-activated:var(--ion-item-color, var(--ion-text-color, #000));--background-focused:var(--ion-item-color, var(--ion-text-color, #000));--background-hover:var(--ion-item-color, var(--ion-text-color, #000));--color:var(--ion-color-primary, #0054e9)}',ios:'.sc-ion-select-modal-ios-h{height:100%}ion-item.sc-ion-select-modal-ios{--inner-padding-end:0}ion-radio.sc-ion-select-modal-ios::after{bottom:0;position:absolute;width:calc(100% - 0.9375rem - 16px);border-width:0px 0px 0.55px 0px;border-style:solid;border-color:var(--ion-item-border-color, var(--ion-border-color, var(--ion-color-step-250, var(--ion-background-color-step-250, #c8c7cc))));content:""}ion-radio.sc-ion-select-modal-ios::after{inset-inline-start:calc(0.9375rem + 16px)}',md:'.sc-ion-select-modal-md-h{height:100%}ion-list.sc-ion-select-modal-md ion-radio.sc-ion-select-modal-md::part(container),ion-list.sc-ion-select-modal-md ion-radio.sc-ion-select-modal-md [part~="container"]{display:none}ion-list.sc-ion-select-modal-md ion-radio.sc-ion-select-modal-md::part(label),ion-list.sc-ion-select-modal-md ion-radio.sc-ion-select-modal-md [part~="label"]{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0}ion-item.sc-ion-select-modal-md{--inner-border-width:0}.item-radio-checked.sc-ion-select-modal-md{--background:rgba(var(--ion-color-primary-rgb, 0, 84, 233), 0.08);--background-focused:var(--ion-color-primary, #0054e9);--background-focused-opacity:0.2;--background-hover:var(--ion-color-primary, #0054e9);--background-hover-opacity:0.12}.item-checkbox-checked.sc-ion-select-modal-md{--background-activated:var(--ion-item-color, var(--ion-text-color, #000));--background-focused:var(--ion-item-color, var(--ion-text-color, #000));--background-hover:var(--ion-item-color, var(--ion-text-color, #000));--color:var(--ion-color-primary, #0054e9)}'}}},[34,"ion-select-modal",{header:[1],cancelText:[1,"cancel-text"],multiple:[4],options:[16]}]);function E(){"undefined"!=typeof customElements&&["ion-select-modal","ion-button","ion-buttons","ion-checkbox","ion-content","ion-header","ion-icon","ion-item","ion-list","ion-radio","ion-radio-group","ion-ripple-effect","ion-title","ion-toolbar"].forEach((o=>{switch(o){case"ion-select-modal":customElements.get(c(o))||customElements.define(c(o),j);break;case"ion-button":customElements.get(c(o))||l();break;case"ion-buttons":customElements.get(c(o))||d();break;case"ion-checkbox":customElements.get(c(o))||m();break;case"ion-content":customElements.get(c(o))||b();break;case"ion-header":customElements.get(c(o))||p();break;case"ion-icon":customElements.get(c(o))||h();break;case"ion-item":customElements.get(c(o))||u();break;case"ion-list":customElements.get(c(o))||f();break;case"ion-radio":customElements.get(c(o))||k();break;case"ion-radio-group":customElements.get(c(o))||g();break;case"ion-ripple-effect":customElements.get(c(o))||v();break;case"ion-title":customElements.get(c(o))||y();break;case"ion-toolbar":customElements.get(c(o))||x()}}))}export{j as S,E as d}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* (C) Ionic http://ionicframework.com - MIT License
|
|
3
|
-
*/
|
|
4
|
-
import{r as o,h as i,i as e,d as t,g as n}from"./p-IGIE5vDm.js";import{b as c}from"./p-NFFyoJ4Q.js";import{s as r}from"./p-DTPR1Wpn.js";import{g as a}from"./p-DiVJyqlX.js";import"./p-ZjP4CjeZ.js";import"./p-CGmVTdWh.js";import"./p-DB_iPQC-.js";import"./p-CmFz1Mjc.js";import"./p-BTEOs1at.js";const s=class{constructor(i){o(this,i),this.cancelText="Close",this.options=[]}closeModal(){const o=this.el.closest("ion-modal");o&&o.dismiss()}findOptionFromEvent(o){const{options:i}=this;return i.find((i=>i.value===o.target.value))}getValues(o){const{multiple:i,options:e}=this;if(i)return e.filter((o=>o.checked)).map((o=>o.value));const t=o?this.findOptionFromEvent(o):null;return t?t.value:void 0}callOptionHandler(o){const i=this.findOptionFromEvent(o),e=this.getValues(o);(null==i?void 0:i.handler)&&r(i.handler,e)}setChecked(o){const{multiple:i}=this,e=this.findOptionFromEvent(o);i&&e&&(e.checked=o.detail.checked)}renderRadioOptions(){const o=this.options.filter((o=>o.checked)).map((o=>o.value))[0];return i("ion-radio-group",{value:o,onIonChange:o=>this.callOptionHandler(o)},this.options.map((e=>i("ion-item",{lines:"none",class:Object.assign({"item-radio-checked":e.value===o},a(e.cssClass))},i("ion-radio",{value:e.value,disabled:e.disabled,justify:"start",labelPlacement:"end",onClick:()=>this.closeModal(),onKeyUp:o=>{" "===o.key&&this.closeModal()}},e.text)))))}renderCheckboxOptions(){return this.options.map((o=>i("ion-item",{class:Object.assign({"item-checkbox-checked":o.checked},a(o.cssClass))},i("ion-checkbox",{value:o.value,disabled:o.disabled,checked:o.checked,justify:"start",labelPlacement:"end",onIonChange:o=>{this.setChecked(o),this.callOptionHandler(o),e(this)}},o.text))))}render(){return i(t,{key:"f8a4cd6ff23ff01eaa1bdaf3c046814e7b30b23b",class:c(this)},i("ion-header",{key:"9e29a7e57ad5cf332641111882f16852187ec8ba"},i("ion-toolbar",{key:"e6af5d6eabbf4b10799fc8a0b8f91d29b12d41f5"},void 0!==this.header&&i("ion-title",{key:"6056e52d15dbf307571d25e0305d67228a79237d"},this.header),i("ion-buttons",{key:"c9aa4fb2e21a93f3a95c5a8f0ba8b7d5553c5a72",slot:"end"},i("ion-button",{key:"5ffbf512719bcb053b652fc96b1b6154d0593095",onClick:()=>this.closeModal()},this.cancelText)))),i("ion-content",{key:"0ec9098798a4e6de7a83a0a7e9d10bdcd7c98a78"},i("ion-list",{key:"d60b1700d3c2f8655951632de810900707a101f0"},!0===this.multiple?this.renderCheckboxOptions():this.renderRadioOptions())))}get el(){return n(this)}};s.style={ionic:'.sc-ion-select-modal-ionic-h{height:100%}ion-list.sc-ion-select-modal-ionic ion-radio.sc-ion-select-modal-ionic::part(container),ion-list.sc-ion-select-modal-ionic ion-radio.sc-ion-select-modal-ionic [part~="container"]{display:none}ion-list.sc-ion-select-modal-ionic ion-radio.sc-ion-select-modal-ionic::part(label),ion-list.sc-ion-select-modal-ionic ion-radio.sc-ion-select-modal-ionic [part~="label"]{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0}ion-item.sc-ion-select-modal-ionic{--inner-border-width:0}.item-radio-checked.sc-ion-select-modal-ionic{--background:rgba(var(--ion-color-primary-rgb, 0, 84, 233), 0.08);--background-focused:var(--ion-color-primary, #0054e9);--background-focused-opacity:0.2;--background-hover:var(--ion-color-primary, #0054e9);--background-hover-opacity:0.12}.item-checkbox-checked.sc-ion-select-modal-ionic{--background-activated:var(--ion-item-color, var(--ion-text-color, #000));--background-focused:var(--ion-item-color, var(--ion-text-color, #000));--background-hover:var(--ion-item-color, var(--ion-text-color, #000));--color:var(--ion-color-primary, #0054e9)}',ios:'.sc-ion-select-modal-ios-h{height:100%}ion-item.sc-ion-select-modal-ios{--inner-padding-end:0}ion-radio.sc-ion-select-modal-ios::after{bottom:0;position:absolute;width:calc(100% - 0.9375rem - 16px);border-width:0px 0px 0.55px 0px;border-style:solid;border-color:var(--ion-item-border-color, var(--ion-border-color, var(--ion-color-step-250, var(--ion-background-color-step-250, #c8c7cc))));content:""}ion-radio.sc-ion-select-modal-ios::after{inset-inline-start:calc(0.9375rem + 16px)}',md:'.sc-ion-select-modal-md-h{height:100%}ion-list.sc-ion-select-modal-md ion-radio.sc-ion-select-modal-md::part(container),ion-list.sc-ion-select-modal-md ion-radio.sc-ion-select-modal-md [part~="container"]{display:none}ion-list.sc-ion-select-modal-md ion-radio.sc-ion-select-modal-md::part(label),ion-list.sc-ion-select-modal-md ion-radio.sc-ion-select-modal-md [part~="label"]{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0}ion-item.sc-ion-select-modal-md{--inner-border-width:0}.item-radio-checked.sc-ion-select-modal-md{--background:rgba(var(--ion-color-primary-rgb, 0, 84, 233), 0.08);--background-focused:var(--ion-color-primary, #0054e9);--background-focused-opacity:0.2;--background-hover:var(--ion-color-primary, #0054e9);--background-hover-opacity:0.12}.item-checkbox-checked.sc-ion-select-modal-md{--background-activated:var(--ion-item-color, var(--ion-text-color, #000));--background-focused:var(--ion-item-color, var(--ion-text-color, #000));--background-hover:var(--ion-item-color, var(--ion-text-color, #000));--color:var(--ion-color-primary, #0054e9)}'};export{s as ion_select_modal}
|