-
Notifications
You must be signed in to change notification settings - Fork 0
/
24-es2015.js.map
1 lines (1 loc) · 17.5 KB
/
24-es2015.js.map
1
{"version":3,"sources":["./node_modules/@ionic/core/dist/esm/ion-radio_2.entry.js"],"names":[],"mappings":";;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAA6G;AAChD;AAC8C;AAC3B;;AAEhF,2BAA2B,0BAA0B,qBAAqB,kBAAkB,8BAA8B,sBAAsB,yBAAyB,sBAAsB,qBAAqB,iBAAiB,UAAU,uBAAuB,oBAAoB,YAAY,oBAAoB,aAAa,sBAAsB,mBAAmB,qBAAqB,uBAAuB,WAAW,YAAY,0BAA0B,yBAAyB,8BAA8B,sBAAsB,MAAM,OAAO,MAAM,cAAc,eAAe,aAAa,gBAAgB,kBAAkB,WAAW,YAAY,SAAS,uBAAuB,eAAe,wBAAwB,qBAAqB,gBAAgB,aAAa,oBAAoB,aAAa,sBAAsB,mBAAmB,UAAU,+CAA+C,WAAW,YAAY,QAAQ,wBAAwB,SAAS,MAAM,kBAAkB,MAAM,OAAO,QAAQ,SAAS,WAAW,YAAY,SAAS,UAAU,SAAS,UAAU,mBAAmB,UAAU,gBAAgB,wBAAwB,qBAAqB,cAAc,aAAa,MAAM,kDAAkD,WAAW,YAAY,6CAA6C,mCAAmC,+BAA+B,cAAc,+FAA+F,+BAA+B,kBAAkB,uBAAuB,uBAAuB,aAAa,UAAU,WAAW,mCAAmC,gCAAgC,wBAAwB,iBAAiB,mBAAmB,oBAAoB,mBAAmB,kCAAkC,uBAAuB,YAAY,uCAAuC,yCAAyC,UAAU,SAAS,cAAc,kBAAkB,WAAW,YAAY,kDAAkD,aAAa,YAAY,uHAAuH,WAAW,YAAY,WAAW,gBAAgB,iBAAiB,kBAAkB,eAAe,kBAAkB,cAAc,gBAAgB,+FAA+F,gBAAgB,kBAAkB,mBAAmB,0BAA0B,yBAAyB,wBAAwB,wBAAwB,4BAA4B,gBAAgB,kBAAkB,eAAe,kBAAk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;AAC/B,oBAAoB,4DAAW;AAC/B,mBAAmB,4DAAW;AAC9B,6BAA6B,iBAAiB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,8DAAgB;AACtB;AACA;AACA;AACA;AACA;AACA,MAAM,8DAAmB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,WAAW,wDAAwD;AACnE,iBAAiB,mEAAU;AAC3B,WAAW,4BAA4B,GAAG,8DAAY;AACtD,YAAY,4DAAC,CAAC,oDAAI,GAAG,oBAAoB,QAAQ,mLAAmL,4DAAkB;AACtP;AACA,mBAAmB,4DAAW;AAC9B;AACA;AACA;AACA,OAAO,GAAG,EAAE,4DAAC,SAAS,yCAAyC,EAAE,4DAAC,SAAS,qCAAqC,GAAG,4DAAC,SAAS,wBAAwB,IAAI,4DAAC,WAAW,mBAAmB,cAAc,4DAAC,WAAW,mFAAmF;AACrS;AACA,YAAY,QAAQ,4DAAU,OAAO;AACrC,yBAAyB;AACzB;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,IAAI,4DAAgB;AACpB,qBAAqB,4DAAW;AAChC,6BAA6B,gBAAgB;AAC7C,sBAAsB,aAAa;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,QAAQ;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,iBAAiB;AAC5B,iBAAiB,mEAAU;AAC3B,YAAY,4DAAC,CAAC,oDAAI,GAAG,oGAAoG;AACzH;AACA,YAAY,QAAQ,4DAAU,OAAO;AACrC,yBAAyB;AACzB;AACA,IAAI;AACJ;AACA;;AAE6D","file":"24-es2015.js","sourcesContent":["import { r as registerInstance, e as createEvent, h, H as Host, i as getElement } from './index-e806d1f6.js';\nimport { b as getIonMode } from './ionic-global-9d5c8ee3.js';\nimport { a as addEventListener, b as removeEventListener, c as getAriaLabel } from './helpers-90f46169.js';\nimport { c as createColorClasses, h as hostContext } from './theme-ff3fc52f.js';\n\nconst radioIosCss = \":host{--inner-border-radius:50%;display:inline-block;position:relative;-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;z-index:2}:host(.radio-disabled){pointer-events:none}.radio-icon{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;width:100%;height:100%;contain:layout size style}.radio-icon,.radio-inner{-webkit-box-sizing:border-box;box-sizing:border-box}label{left:0;top:0;margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;position:absolute;width:100%;height:100%;border:0;background:transparent;cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;outline:none;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;opacity:0}[dir=rtl] label,:host-context([dir=rtl]) label{left:unset;right:unset;right:0}label::-moz-focus-inner{border:0}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}:host(:focus){outline:none}:host{--color-checked:var(--ion-color-primary, #3880ff);width:15px;height:24px}:host(.ion-color.radio-checked) .radio-inner{border-color:var(--ion-color-base)}.item-radio.item-ios ion-label{margin-left:0}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){.item-radio.item-ios ion-label{margin-left:unset;-webkit-margin-start:0;margin-inline-start:0}}.radio-inner{width:33%;height:50%}:host(.radio-checked) .radio-inner{-webkit-transform:rotate(45deg);transform:rotate(45deg);border-width:2px;border-top-width:0;border-left-width:0;border-style:solid;border-color:var(--color-checked)}:host(.radio-disabled){opacity:0.3}:host(.ion-focused) .radio-icon::after{border-radius:var(--inner-border-radius);left:-9px;top:-8px;display:block;position:absolute;width:36px;height:36px;background:var(--ion-color-primary-tint, #4c8dff);content:\\\"\\\";opacity:0.2}:host-context([dir=rtl]):host(.ion-focused) .radio-icon::after,:host-context([dir=rtl]).ion-focused .radio-icon::after{left:unset;right:unset;right:-9px}:host(.in-item){margin-left:10px;margin-right:11px;margin-top:8px;margin-bottom:8px;display:block;position:static}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){:host(.in-item){margin-left:unset;margin-right:unset;-webkit-margin-start:10px;margin-inline-start:10px;-webkit-margin-end:11px;margin-inline-end:11px}}:host(.in-item[slot=start]){margin-left:3px;margin-right:21px;margin-top:8px;margin-bottom:8px}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){:host(.in-item[slot=start]){margin-left:unset;margin-right:unset;-webkit-margin-start:3px;margin-inline-start:3px;-webkit-margin-end:21px;margin-inline-end:21px}}\";\n\nconst radioMdCss = \":host{--inner-border-radius:50%;display:inline-block;position:relative;-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;z-index:2}:host(.radio-disabled){pointer-events:none}.radio-icon{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;width:100%;height:100%;contain:layout size style}.radio-icon,.radio-inner{-webkit-box-sizing:border-box;box-sizing:border-box}label{left:0;top:0;margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;position:absolute;width:100%;height:100%;border:0;background:transparent;cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;outline:none;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;opacity:0}[dir=rtl] label,:host-context([dir=rtl]) label{left:unset;right:unset;right:0}label::-moz-focus-inner{border:0}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}:host(:focus){outline:none}:host{--color:var(--ion-color-step-400, #999999);--color-checked:var(--ion-color-primary, #3880ff);--border-width:2px;--border-style:solid;--border-radius:50%;width:20px;height:20px}:host(.ion-color) .radio-inner{background:var(--ion-color-base)}:host(.ion-color.radio-checked) .radio-icon{border-color:var(--ion-color-base)}.radio-icon{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;border-radius:var(--border-radius);border-width:var(--border-width);border-style:var(--border-style);border-color:var(--color)}.radio-inner{border-radius:var(--inner-border-radius);width:calc(50% + var(--border-width));height:calc(50% + var(--border-width));-webkit-transform:scale3d(0, 0, 0);transform:scale3d(0, 0, 0);-webkit-transition:-webkit-transform 280ms cubic-bezier(0.4, 0, 0.2, 1);transition:-webkit-transform 280ms cubic-bezier(0.4, 0, 0.2, 1);transition:transform 280ms cubic-bezier(0.4, 0, 0.2, 1);transition:transform 280ms cubic-bezier(0.4, 0, 0.2, 1), -webkit-transform 280ms cubic-bezier(0.4, 0, 0.2, 1);background:var(--color-checked)}:host(.radio-checked) .radio-icon{border-color:var(--color-checked)}:host(.radio-checked) .radio-inner{-webkit-transform:scale3d(1, 1, 1);transform:scale3d(1, 1, 1)}:host(.radio-disabled){opacity:0.3}:host(.ion-focused) .radio-icon::after{border-radius:var(--inner-border-radius);left:-12px;top:-12px;display:block;position:absolute;width:36px;height:36px;background:var(--ion-color-primary-tint, #4c8dff);content:\\\"\\\";opacity:0.2}:host-context([dir=rtl]):host(.ion-focused) .radio-icon::after,:host-context([dir=rtl]).ion-focused .radio-icon::after{left:unset;right:unset;right:-12px}:host(.in-item){margin-left:0;margin-right:0;margin-top:9px;margin-bottom:9px;display:block;position:static}:host(.in-item[slot=start]){margin-left:4px;margin-right:36px;margin-top:11px;margin-bottom:10px}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){:host(.in-item[slot=start]){margin-left:unset;margin-right:unset;-webkit-margin-start:4px;margin-inline-start:4px;-webkit-margin-end:36px;margin-inline-end:36px}}\";\n\nconst Radio = class {\n constructor(hostRef) {\n registerInstance(this, hostRef);\n this.ionStyle = createEvent(this, \"ionStyle\", 7);\n this.ionFocus = createEvent(this, \"ionFocus\", 7);\n this.ionBlur = createEvent(this, \"ionBlur\", 7);\n this.inputId = `ion-rb-${radioButtonIds++}`;\n this.radioGroup = null;\n /**\n * If `true`, the radio is selected.\n */\n this.checked = false;\n /**\n * The tabindex of the radio button.\n * @internal\n */\n this.buttonTabindex = -1;\n /**\n * The name of the control, which is submitted with the form data.\n */\n this.name = this.inputId;\n /**\n * If `true`, the user cannot interact with the radio.\n */\n this.disabled = false;\n this.updateState = () => {\n if (this.radioGroup) {\n this.checked = this.radioGroup.value === this.value;\n }\n };\n this.onFocus = () => {\n this.ionFocus.emit();\n };\n this.onBlur = () => {\n this.ionBlur.emit();\n };\n }\n /** @internal */\n async setFocus(ev) {\n ev.stopPropagation();\n ev.preventDefault();\n this.el.focus();\n }\n /** @internal */\n async setButtonTabindex(value) {\n this.buttonTabindex = value;\n }\n connectedCallback() {\n if (this.value === undefined) {\n this.value = this.inputId;\n }\n const radioGroup = this.radioGroup = this.el.closest('ion-radio-group');\n if (radioGroup) {\n this.updateState();\n addEventListener(radioGroup, 'ionChange', this.updateState);\n }\n }\n disconnectedCallback() {\n const radioGroup = this.radioGroup;\n if (radioGroup) {\n removeEventListener(radioGroup, 'ionChange', this.updateState);\n this.radioGroup = null;\n }\n }\n componentWillLoad() {\n this.emitStyle();\n }\n emitStyle() {\n this.ionStyle.emit({\n 'radio-checked': this.checked,\n 'interactive-disabled': this.disabled,\n });\n }\n render() {\n const { inputId, disabled, checked, color, el, buttonTabindex } = this;\n const mode = getIonMode(this);\n const { label, labelId, labelText } = getAriaLabel(el, inputId);\n return (h(Host, { \"aria-checked\": `${checked}`, \"aria-hidden\": disabled ? 'true' : null, \"aria-labelledby\": label ? labelId : null, role: \"radio\", tabindex: buttonTabindex, onFocus: this.onFocus, onBlur: this.onBlur, class: createColorClasses(color, {\n [mode]: true,\n 'in-item': hostContext('ion-item', el),\n 'interactive': true,\n 'radio-checked': checked,\n 'radio-disabled': disabled,\n }) }, h(\"div\", { class: \"radio-icon\", part: \"container\" }, h(\"div\", { class: \"radio-inner\", part: \"mark\" }), h(\"div\", { class: \"radio-ripple\" })), h(\"label\", { htmlFor: inputId }, labelText), h(\"input\", { type: \"radio\", checked: checked, disabled: disabled, tabindex: \"-1\", id: inputId })));\n }\n get el() { return getElement(this); }\n static get watchers() { return {\n \"color\": [\"emitStyle\"],\n \"checked\": [\"emitStyle\"],\n \"disabled\": [\"emitStyle\"]\n }; }\n};\nlet radioButtonIds = 0;\nRadio.style = {\n ios: radioIosCss,\n md: radioMdCss\n};\n\nconst RadioGroup = class {\n constructor(hostRef) {\n registerInstance(this, hostRef);\n this.ionChange = createEvent(this, \"ionChange\", 7);\n this.inputId = `ion-rg-${radioGroupIds++}`;\n this.labelId = `${this.inputId}-lbl`;\n /**\n * If `true`, the radios can be deselected.\n */\n this.allowEmptySelection = false;\n /**\n * The name of the control, which is submitted with the form data.\n */\n this.name = this.inputId;\n this.setRadioTabindex = (value) => {\n const radios = this.getRadios();\n // Get the first radio that is not disabled and the checked one\n const first = radios.find(radio => !radio.disabled);\n const checked = radios.find(radio => (radio.value === value && !radio.disabled));\n if (!first && !checked) {\n return;\n }\n // If an enabled checked radio exists, set it to be the focusable radio\n // otherwise we default to focus the first radio\n const focusable = checked || first;\n for (const radio of radios) {\n const tabindex = radio === focusable ? 0 : -1;\n radio.setButtonTabindex(tabindex);\n }\n };\n this.onClick = (ev) => {\n ev.preventDefault();\n const selectedRadio = ev.target && ev.target.closest('ion-radio');\n if (selectedRadio) {\n const currentValue = this.value;\n const newValue = selectedRadio.value;\n if (newValue !== currentValue) {\n this.value = newValue;\n }\n else if (this.allowEmptySelection) {\n this.value = undefined;\n }\n }\n };\n }\n valueChanged(value) {\n this.setRadioTabindex(value);\n this.ionChange.emit({ value });\n }\n componentDidLoad() {\n this.setRadioTabindex(this.value);\n }\n async connectedCallback() {\n // Get the list header if it exists and set the id\n // this is used to set aria-labelledby\n const header = this.el.querySelector('ion-list-header') || this.el.querySelector('ion-item-divider');\n if (header) {\n const label = this.label = header.querySelector('ion-label');\n if (label) {\n this.labelId = label.id = this.name + '-lbl';\n }\n }\n }\n getRadios() {\n return Array.from(this.el.querySelectorAll('ion-radio'));\n }\n onKeydown(ev) {\n const inSelectPopover = !!this.el.closest('ion-select-popover');\n if (ev.target && !this.el.contains(ev.target)) {\n return;\n }\n // Get all radios inside of the radio group and then\n // filter out disabled radios since we need to skip those\n const radios = Array.from(this.el.querySelectorAll('ion-radio')).filter(radio => !radio.disabled);\n // Only move the radio if the current focus is in the radio group\n if (ev.target && radios.includes(ev.target)) {\n const index = radios.findIndex(radio => radio === ev.target);\n const current = radios[index];\n let next;\n // If hitting arrow down or arrow right, move to the next radio\n // If we're on the last radio, move to the first radio\n if (['ArrowDown', 'ArrowRight'].includes(ev.code)) {\n next = (index === radios.length - 1)\n ? radios[0]\n : radios[index + 1];\n }\n // If hitting arrow up or arrow left, move to the previous radio\n // If we're on the first radio, move to the last radio\n if (['ArrowUp', 'ArrowLeft'].includes(ev.code)) {\n next = (index === 0)\n ? radios[radios.length - 1]\n : radios[index - 1];\n }\n if (next && radios.includes(next)) {\n next.setFocus(ev);\n if (!inSelectPopover) {\n this.value = next.value;\n }\n }\n // Update the radio group value when a user presses the\n // space bar on top of a selected radio (only applies\n // to radios in a select popover)\n if (['Space'].includes(ev.code)) {\n this.value = current.value;\n }\n }\n }\n render() {\n const { label, labelId } = this;\n const mode = getIonMode(this);\n return (h(Host, { role: \"radiogroup\", \"aria-labelledby\": label ? labelId : null, onClick: this.onClick, class: mode }));\n }\n get el() { return getElement(this); }\n static get watchers() { return {\n \"value\": [\"valueChanged\"]\n }; }\n};\nlet radioGroupIds = 0;\n\nexport { Radio as ion_radio, RadioGroup as ion_radio_group };\n"],"sourceRoot":"webpack:///"}