react-klasha
Version:
This is an reactJS library for implementing klasha payment gateway
1 lines • 37.5 kB
JSON
{"ast":null,"code":"import { __awaiter, __generator } from \"tslib\";\nimport { r as registerInstance, e as createEvent, h, H as Host, i as getElement } from \"./index-7a8b7a1c.js\";\nimport { b as getIonMode } from \"./ionic-global-63a97a32.js\";\nimport { a as addEventListener, b as removeEventListener, d as getAriaLabel } from \"./helpers-dd7e4b7b.js\";\nimport { c as createColorClasses, h as hostContext } from \"./theme-ff3fc52f.js\";\nvar 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}}';\nvar 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\nvar Radio = function () {\n function e(e) {\n var t = this;\n registerInstance(this, e);\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 this.checked = false;\n this.buttonTabindex = -1;\n this.name = this.inputId;\n this.disabled = false;\n\n this.updateState = function () {\n if (t.radioGroup) {\n t.checked = t.radioGroup.value === t.value;\n }\n };\n\n this.onFocus = function () {\n t.ionFocus.emit();\n };\n\n this.onBlur = function () {\n t.ionBlur.emit();\n };\n }\n\n e.prototype.setFocus = function (e) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (t) {\n e.stopPropagation();\n e.preventDefault();\n this.el.focus();\n return [2];\n });\n });\n };\n\n e.prototype.setButtonTabindex = function (e) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (t) {\n this.buttonTabindex = e;\n return [2];\n });\n });\n };\n\n e.prototype.connectedCallback = function () {\n if (this.value === undefined) {\n this.value = this.inputId;\n }\n\n var e = this.radioGroup = this.el.closest(\"ion-radio-group\");\n\n if (e) {\n this.updateState();\n addEventListener(e, \"ionChange\", this.updateState);\n }\n };\n\n e.prototype.disconnectedCallback = function () {\n var e = this.radioGroup;\n\n if (e) {\n removeEventListener(e, \"ionChange\", this.updateState);\n this.radioGroup = null;\n }\n };\n\n e.prototype.componentWillLoad = function () {\n this.emitStyle();\n };\n\n e.prototype.emitStyle = function () {\n this.ionStyle.emit({\n \"radio-checked\": this.checked,\n \"interactive-disabled\": this.disabled\n });\n };\n\n e.prototype.render = function () {\n var e;\n var t = this,\n i = t.inputId,\n r = t.disabled,\n o = t.checked,\n n = t.color,\n a = t.el,\n s = t.buttonTabindex;\n var l = getIonMode(this);\n var d = getAriaLabel(a, i),\n c = d.label,\n u = d.labelId,\n p = d.labelText;\n return h(Host, {\n \"aria-checked\": \"\" + o,\n \"aria-hidden\": r ? \"true\" : null,\n \"aria-labelledby\": c ? u : null,\n role: \"radio\",\n tabindex: s,\n onFocus: this.onFocus,\n onBlur: this.onBlur,\n class: createColorClasses(n, (e = {}, e[l] = true, e[\"in-item\"] = hostContext(\"ion-item\", a), e[\"interactive\"] = true, e[\"radio-checked\"] = o, e[\"radio-disabled\"] = r, e))\n }, h(\"div\", {\n class: \"radio-icon\",\n part: \"container\"\n }, h(\"div\", {\n class: \"radio-inner\",\n part: \"mark\"\n }), h(\"div\", {\n class: \"radio-ripple\"\n })), h(\"label\", {\n htmlFor: i\n }, p), h(\"input\", {\n type: \"radio\",\n checked: o,\n disabled: r,\n tabindex: \"-1\",\n id: i\n }));\n };\n\n Object.defineProperty(e.prototype, \"el\", {\n get: function () {\n return getElement(this);\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(e, \"watchers\", {\n get: function () {\n return {\n color: [\"emitStyle\"],\n checked: [\"emitStyle\"],\n disabled: [\"emitStyle\"]\n };\n },\n enumerable: false,\n configurable: true\n });\n return e;\n}();\n\nvar radioButtonIds = 0;\nRadio.style = {\n ios: radioIosCss,\n md: radioMdCss\n};\n\nvar RadioGroup = function () {\n function e(e) {\n var t = this;\n registerInstance(this, e);\n this.ionChange = createEvent(this, \"ionChange\", 7);\n this.inputId = \"ion-rg-\" + radioGroupIds++;\n this.labelId = this.inputId + \"-lbl\";\n this.allowEmptySelection = false;\n this.name = this.inputId;\n\n this.setRadioTabindex = function (e) {\n var i = t.getRadios();\n var r = i.find(function (e) {\n return !e.disabled;\n });\n var o = i.find(function (t) {\n return t.value === e && !t.disabled;\n });\n\n if (!r && !o) {\n return;\n }\n\n var n = o || r;\n\n for (var a = 0, s = i; a < s.length; a++) {\n var l = s[a];\n var d = l === n ? 0 : -1;\n l.setButtonTabindex(d);\n }\n };\n\n this.onClick = function (e) {\n e.preventDefault();\n var i = e.target && e.target.closest(\"ion-radio\");\n\n if (i) {\n var r = t.value;\n var o = i.value;\n\n if (o !== r) {\n t.value = o;\n } else if (t.allowEmptySelection) {\n t.value = undefined;\n }\n }\n };\n }\n\n e.prototype.valueChanged = function (e) {\n this.setRadioTabindex(e);\n this.ionChange.emit({\n value: e\n });\n };\n\n e.prototype.componentDidLoad = function () {\n this.setRadioTabindex(this.value);\n };\n\n e.prototype.connectedCallback = function () {\n return __awaiter(this, void 0, void 0, function () {\n var e, t;\n return __generator(this, function (i) {\n e = this.el.querySelector(\"ion-list-header\") || this.el.querySelector(\"ion-item-divider\");\n\n if (e) {\n t = this.label = e.querySelector(\"ion-label\");\n\n if (t) {\n this.labelId = t.id = this.name + \"-lbl\";\n }\n }\n\n return [2];\n });\n });\n };\n\n e.prototype.getRadios = function () {\n return Array.from(this.el.querySelectorAll(\"ion-radio\"));\n };\n\n e.prototype.onKeydown = function (e) {\n var t = !!this.el.closest(\"ion-select-popover\");\n\n if (e.target && !this.el.contains(e.target)) {\n return;\n }\n\n var i = this.getRadios().filter(function (e) {\n return !e.disabled;\n });\n\n if (e.target && i.includes(e.target)) {\n var r = i.findIndex(function (t) {\n return t === e.target;\n });\n var o = i[r];\n var n = void 0;\n\n if ([\"ArrowDown\", \"ArrowRight\"].includes(e.code)) {\n n = r === i.length - 1 ? i[0] : i[r + 1];\n }\n\n if ([\"ArrowUp\", \"ArrowLeft\"].includes(e.code)) {\n n = r === 0 ? i[i.length - 1] : i[r - 1];\n }\n\n if (n && i.includes(n)) {\n n.setFocus(e);\n\n if (!t) {\n this.value = n.value;\n }\n }\n\n if ([\"Space\"].includes(e.code)) {\n this.value = this.allowEmptySelection && this.value !== undefined ? undefined : o.value;\n e.preventDefault();\n }\n }\n };\n\n e.prototype.render = function () {\n var e = this,\n t = e.label,\n i = e.labelId;\n var r = getIonMode(this);\n return h(Host, {\n role: \"radiogroup\",\n \"aria-labelledby\": t ? i : null,\n onClick: this.onClick,\n class: r\n });\n };\n\n Object.defineProperty(e.prototype, \"el\", {\n get: function () {\n return getElement(this);\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(e, \"watchers\", {\n get: function () {\n return {\n value: [\"valueChanged\"]\n };\n },\n enumerable: false,\n configurable: true\n });\n return e;\n}();\n\nvar radioGroupIds = 0;\nexport { Radio as ion_radio, RadioGroup as ion_radio_group };","map":{"version":3,"sources":["/Users/adekanbidansteve/github/klasha/react-klasha/ionic-test/node_modules/@ionic/core/dist/esm-es5/ion-radio_2.entry.js"],"names":["__awaiter","__generator","r","registerInstance","e","createEvent","h","H","Host","i","getElement","b","getIonMode","a","addEventListener","removeEventListener","d","getAriaLabel","c","createColorClasses","hostContext","radioIosCss","radioMdCss","Radio","t","ionStyle","ionFocus","ionBlur","inputId","radioButtonIds","radioGroup","checked","buttonTabindex","name","disabled","updateState","value","onFocus","emit","onBlur","prototype","setFocus","stopPropagation","preventDefault","el","focus","setButtonTabindex","connectedCallback","undefined","closest","disconnectedCallback","componentWillLoad","emitStyle","render","o","n","color","s","l","label","u","labelId","p","labelText","role","tabindex","class","part","htmlFor","type","id","Object","defineProperty","get","enumerable","configurable","style","ios","md","RadioGroup","ionChange","radioGroupIds","allowEmptySelection","setRadioTabindex","getRadios","find","length","onClick","target","valueChanged","componentDidLoad","querySelector","Array","from","querySelectorAll","onKeydown","contains","filter","includes","findIndex","code","ion_radio","ion_radio_group"],"mappings":"AAAA,SAAOA,SAAP,EAAiBC,WAAjB,QAAiC,OAAjC;AAAyC,SAAOC,CAAC,IAAIC,gBAAZ,EAA6BC,CAAC,IAAIC,WAAlC,EAA8CC,CAA9C,EAAgDC,CAAC,IAAIC,IAArD,EAA0DC,CAAC,IAAIC,UAA/D,QAA8E,qBAA9E;AAAoG,SAAOC,CAAC,IAAIC,UAAZ,QAA2B,4BAA3B;AAAwD,SAAOC,CAAC,IA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L;;AAAkLqE,EAAAA,MAAM,CAACC,cAAP,CAAsBpE,CAAC,CAACoC,SAAxB,EAAkC,IAAlC,EAAuC;AAACiC,IAAAA,GAAG,EAAC,YAAU;AAAC,aAAO/D,UAAU,CAAC,IAAD,CAAjB;AAAwB,KAAxC;AAAyCgE,IAAAA,UAAU,EAAC,KAApD;AAA0DC,IAAAA,YAAY,EAAC;AAAvE,GAAvC;AAAqHJ,EAAAA,MAAM,CAACC,cAAP,CAAsBpE,CAAtB,EAAwB,UAAxB,EAAmC;AAACqE,IAAAA,GAAG,EAAC,YAAU;AAAC,aAAM;AAACrC,QAAAA,KAAK,EAAC,CAAC,cAAD;AAAP,OAAN;AAA+B,KAA/C;AAAgDsC,IAAAA,UAAU,EAAC,KAA3D;AAAiEC,IAAAA,YAAY,EAAC;AAA9E,GAAnC;AAAwH,SAAOvE,CAAP;AAAS,CAA/zE,EAAf;;AAAi1E,IAAI6E,aAAa,GAAC,CAAlB;AAAoB,SAAO1D,KAAK,IAAI8E,SAAhB,EAA0BtB,UAAU,IAAIuB,eAAxC","sourcesContent":["import{__awaiter,__generator}from\"tslib\";import{r as registerInstance,e as createEvent,h,H as Host,i as getElement}from\"./index-7a8b7a1c.js\";import{b as getIonMode}from\"./ionic-global-63a97a32.js\";import{a as addEventListener,b as removeEventListener,d as getAriaLabel}from\"./helpers-dd7e4b7b.js\";import{c as createColorClasses,h as hostContext}from\"./theme-ff3fc52f.js\";var 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}}';var 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}}';var Radio=function(){function e(e){var t=this;registerInstance(this,e);this.ionStyle=createEvent(this,\"ionStyle\",7);this.ionFocus=createEvent(this,\"ionFocus\",7);this.ionBlur=createEvent(this,\"ionBlur\",7);this.inputId=\"ion-rb-\"+radioButtonIds++;this.radioGroup=null;this.checked=false;this.buttonTabindex=-1;this.name=this.inputId;this.disabled=false;this.updateState=function(){if(t.radioGroup){t.checked=t.radioGroup.value===t.value}};this.onFocus=function(){t.ionFocus.emit()};this.onBlur=function(){t.ionBlur.emit()}}e.prototype.setFocus=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){e.stopPropagation();e.preventDefault();this.el.focus();return[2]}))}))};e.prototype.setButtonTabindex=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){this.buttonTabindex=e;return[2]}))}))};e.prototype.connectedCallback=function(){if(this.value===undefined){this.value=this.inputId}var e=this.radioGroup=this.el.closest(\"ion-radio-group\");if(e){this.updateState();addEventListener(e,\"ionChange\",this.updateState)}};e.prototype.disconnectedCallback=function(){var e=this.radioGroup;if(e){removeEventListener(e,\"ionChange\",this.updateState);this.radioGroup=null}};e.prototype.componentWillLoad=function(){this.emitStyle()};e.prototype.emitStyle=function(){this.ionStyle.emit({\"radio-checked\":this.checked,\"interactive-disabled\":this.disabled})};e.prototype.render=function(){var e;var t=this,i=t.inputId,r=t.disabled,o=t.checked,n=t.color,a=t.el,s=t.buttonTabindex;var l=getIonMode(this);var d=getAriaLabel(a,i),c=d.label,u=d.labelId,p=d.labelText;return h(Host,{\"aria-checked\":\"\"+o,\"aria-hidden\":r?\"true\":null,\"aria-labelledby\":c?u:null,role:\"radio\",tabindex:s,onFocus:this.onFocus,onBlur:this.onBlur,class:createColorClasses(n,(e={},e[l]=true,e[\"in-item\"]=hostContext(\"ion-item\",a),e[\"interactive\"]=true,e[\"radio-checked\"]=o,e[\"radio-disabled\"]=r,e))},h(\"div\",{class:\"radio-icon\",part:\"container\"},h(\"div\",{class:\"radio-inner\",part:\"mark\"}),h(\"div\",{class:\"radio-ripple\"})),h(\"label\",{htmlFor:i},p),h(\"input\",{type:\"radio\",checked:o,disabled:r,tabindex:\"-1\",id:i}))};Object.defineProperty(e.prototype,\"el\",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(e,\"watchers\",{get:function(){return{color:[\"emitStyle\"],checked:[\"emitStyle\"],disabled:[\"emitStyle\"]}},enumerable:false,configurable:true});return e}();var radioButtonIds=0;Radio.style={ios:radioIosCss,md:radioMdCss};var RadioGroup=function(){function e(e){var t=this;registerInstance(this,e);this.ionChange=createEvent(this,\"ionChange\",7);this.inputId=\"ion-rg-\"+radioGroupIds++;this.labelId=this.inputId+\"-lbl\";this.allowEmptySelection=false;this.name=this.inputId;this.setRadioTabindex=function(e){var i=t.getRadios();var r=i.find((function(e){return!e.disabled}));var o=i.find((function(t){return t.value===e&&!t.disabled}));if(!r&&!o){return}var n=o||r;for(var a=0,s=i;a<s.length;a++){var l=s[a];var d=l===n?0:-1;l.setButtonTabindex(d)}};this.onClick=function(e){e.preventDefault();var i=e.target&&e.target.closest(\"ion-radio\");if(i){var r=t.value;var o=i.value;if(o!==r){t.value=o}else if(t.allowEmptySelection){t.value=undefined}}}}e.prototype.valueChanged=function(e){this.setRadioTabindex(e);this.ionChange.emit({value:e})};e.prototype.componentDidLoad=function(){this.setRadioTabindex(this.value)};e.prototype.connectedCallback=function(){return __awaiter(this,void 0,void 0,(function(){var e,t;return __generator(this,(function(i){e=this.el.querySelector(\"ion-list-header\")||this.el.querySelector(\"ion-item-divider\");if(e){t=this.label=e.querySelector(\"ion-label\");if(t){this.labelId=t.id=this.name+\"-lbl\"}}return[2]}))}))};e.prototype.getRadios=function(){return Array.from(this.el.querySelectorAll(\"ion-radio\"))};e.prototype.onKeydown=function(e){var t=!!this.el.closest(\"ion-select-popover\");if(e.target&&!this.el.contains(e.target)){return}var i=this.getRadios().filter((function(e){return!e.disabled}));if(e.target&&i.includes(e.target)){var r=i.findIndex((function(t){return t===e.target}));var o=i[r];var n=void 0;if([\"ArrowDown\",\"ArrowRight\"].includes(e.code)){n=r===i.length-1?i[0]:i[r+1]}if([\"ArrowUp\",\"ArrowLeft\"].includes(e.code)){n=r===0?i[i.length-1]:i[r-1]}if(n&&i.includes(n)){n.setFocus(e);if(!t){this.value=n.value}}if([\"Space\"].includes(e.code)){this.value=this.allowEmptySelection&&this.value!==undefined?undefined:o.value;e.preventDefault()}}};e.prototype.render=function(){var e=this,t=e.label,i=e.labelId;var r=getIonMode(this);return h(Host,{role:\"radiogroup\",\"aria-labelledby\":t?i:null,onClick:this.onClick,class:r})};Object.defineProperty(e.prototype,\"el\",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(e,\"watchers\",{get:function(){return{value:[\"valueChanged\"]}},enumerable:false,configurable:true});return e}();var radioGroupIds=0;export{Radio as ion_radio,RadioGroup as ion_radio_group};"]},"metadata":{},"sourceType":"module"}