react-klasha
Version:
This is an reactJS library for implementing klasha payment gateway
1 lines • 82.5 kB
JSON
{"ast":null,"code":"import { __awaiter, __generator } from \"tslib\";\nimport { r as registerInstance, e as createEvent, c as writeTask, h, H as Host, i as getElement, j as forceUpdate } from \"./index-7a8b7a1c.js\";\nimport { c as config, b as getIonMode } from \"./ionic-global-63a97a32.js\";\nimport { p as pointerCoord, a as addEventListener, b as removeEventListener } from \"./helpers-dd7e4b7b.js\";\nimport { c as createColorClasses, h as hostContext } from \"./theme-ff3fc52f.js\";\nvar segmentIosCss = \":host{--ripple-color:currentColor;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;display:-ms-flexbox;display:flex;position:relative;-ms-flex-align:stretch;align-items:stretch;-ms-flex-pack:center;justify-content:center;width:100%;background:var(--background);font-family:var(--ion-font-family, inherit);text-align:center;contain:paint;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}:host(.segment-scrollable){-ms-flex-pack:start;justify-content:start;width:auto;overflow-x:auto}:host(.segment-scrollable::-webkit-scrollbar){display:none}:host{--background:rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.065);border-radius:8px;overflow:hidden;z-index:0}:host(.ion-color){background:rgba(var(--ion-color-base-rgb), 0.065)}:host(.in-toolbar){margin-left:auto;margin-right:auto;margin-top:0;margin-bottom:0;width:auto}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){:host(.in-toolbar){margin-left:unset;margin-right:unset;-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:auto;margin-inline-end:auto}}:host(.in-toolbar:not(.ion-color)){background:var(--ion-toolbar-segment-background, var(--background))}:host(.in-toolbar-color:not(.ion-color)){background:rgba(var(--ion-color-contrast-rgb), 0.11)}\";\nvar segmentMdCss = \":host{--ripple-color:currentColor;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;display:-ms-flexbox;display:flex;position:relative;-ms-flex-align:stretch;align-items:stretch;-ms-flex-pack:center;justify-content:center;width:100%;background:var(--background);font-family:var(--ion-font-family, inherit);text-align:center;contain:paint;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}:host(.segment-scrollable){-ms-flex-pack:start;justify-content:start;width:auto;overflow-x:auto}:host(.segment-scrollable::-webkit-scrollbar){display:none}:host{--background:transparent}:host(.segment-scrollable) ::slotted(ion-segment-button){min-width:auto}\";\n\nvar Segment = function () {\n function t(t) {\n var e = this;\n registerInstance(this, t);\n this.ionChange = createEvent(this, \"ionChange\", 7);\n this.ionSelect = createEvent(this, \"ionSelect\", 7);\n this.ionStyle = createEvent(this, \"ionStyle\", 7);\n this.didInit = false;\n this.activated = false;\n this.disabled = false;\n this.scrollable = false;\n this.swipeGesture = true;\n\n this.onClick = function (t) {\n var o = t.target;\n var n = e.checked;\n\n if (o.tagName === \"ION-SEGMENT\") {\n return;\n }\n\n e.value = o.value;\n\n if (e.scrollable || !e.swipeGesture) {\n if (n) {\n e.checkButton(n, o);\n } else {\n e.setCheckedClasses();\n }\n }\n\n e.checked = o;\n };\n }\n\n t.prototype.colorChanged = function (t, e) {\n if (e === undefined && t !== undefined || e !== undefined && t === undefined) {\n this.emitStyle();\n }\n };\n\n t.prototype.swipeGestureChanged = function () {\n this.gestureChanged();\n };\n\n t.prototype.valueChanged = function (t, e) {\n this.ionSelect.emit({\n value: t\n });\n\n if (e !== \"\" || this.didInit) {\n if (!this.activated) {\n this.ionChange.emit({\n value: t\n });\n } else {\n this.valueAfterGesture = t;\n }\n }\n };\n\n t.prototype.disabledChanged = function () {\n this.gestureChanged();\n var t = this.getButtons();\n\n for (var e = 0, o = t; e < o.length; e++) {\n var n = o[e];\n n.disabled = this.disabled;\n }\n };\n\n t.prototype.gestureChanged = function () {\n if (this.gesture) {\n this.gesture.enable(!this.scrollable && !this.disabled && this.swipeGesture);\n }\n };\n\n t.prototype.connectedCallback = function () {\n this.emitStyle();\n };\n\n t.prototype.componentWillLoad = function () {\n this.emitStyle();\n };\n\n t.prototype.componentDidLoad = function () {\n return __awaiter(this, void 0, void 0, function () {\n var t;\n var e = this;\n return __generator(this, function (o) {\n switch (o.label) {\n case 0:\n this.setCheckedClasses();\n t = this;\n return [4, import(\"./index-f49d994d.js\")];\n\n case 1:\n t.gesture = o.sent().createGesture({\n el: this.el,\n gestureName: \"segment\",\n gesturePriority: 100,\n threshold: 0,\n passive: false,\n onStart: function (t) {\n return e.onStart(t);\n },\n onMove: function (t) {\n return e.onMove(t);\n },\n onEnd: function (t) {\n return e.onEnd(t);\n }\n });\n this.gestureChanged();\n\n if (this.disabled) {\n this.disabledChanged();\n }\n\n this.didInit = true;\n return [2];\n }\n });\n });\n };\n\n t.prototype.onStart = function (t) {\n this.activate(t);\n };\n\n t.prototype.onMove = function (t) {\n this.setNextIndex(t);\n };\n\n t.prototype.onEnd = function (t) {\n this.setActivated(false);\n var e = this.setNextIndex(t, true);\n t.event.stopImmediatePropagation();\n\n if (e) {\n this.addRipple(t);\n }\n\n var o = this.valueAfterGesture;\n\n if (o !== undefined) {\n this.ionChange.emit({\n value: o\n });\n this.valueAfterGesture = undefined;\n }\n };\n\n t.prototype.getButtons = function () {\n return Array.from(this.el.querySelectorAll(\"ion-segment-button\"));\n };\n\n t.prototype.addRipple = function (t) {\n var e = this;\n var o = config.getBoolean(\"animated\", true) && config.getBoolean(\"rippleEffect\", true);\n\n if (!o) {\n return;\n }\n\n var n = this.getButtons();\n var i = n.find(function (t) {\n return t.value === e.value;\n });\n var r = i.shadowRoot || i;\n var a = r.querySelector(\"ion-ripple-effect\");\n\n if (!a) {\n return;\n }\n\n var s = pointerCoord(t.event),\n l = s.x,\n c = s.y;\n a.addRipple(l, c).then(function (t) {\n return t();\n });\n };\n\n t.prototype.setActivated = function (t) {\n var e = this.getButtons();\n e.forEach(function (e) {\n if (t) {\n e.classList.add(\"segment-button-activated\");\n } else {\n e.classList.remove(\"segment-button-activated\");\n }\n });\n this.activated = t;\n };\n\n t.prototype.activate = function (t) {\n var e = this;\n var o = t.event.target;\n var n = this.getButtons();\n var i = n.find(function (t) {\n return t.value === e.value;\n });\n\n if (o.tagName !== \"ION-SEGMENT-BUTTON\") {\n return;\n }\n\n if (!i) {\n this.value = o.value;\n this.setCheckedClasses();\n }\n\n if (this.value === o.value) {\n this.setActivated(true);\n }\n };\n\n t.prototype.getIndicator = function (t) {\n var e = t.shadowRoot || t;\n return e.querySelector(\".segment-button-indicator\");\n };\n\n t.prototype.checkButton = function (t, e) {\n var o = this.getIndicator(t);\n var n = this.getIndicator(e);\n\n if (o === null || n === null) {\n return;\n }\n\n var i = o.getBoundingClientRect();\n var r = n.getBoundingClientRect();\n var a = i.width / r.width;\n var s = i.left - r.left;\n var l = \"translate3d(\" + s + \"px, 0, 0) scaleX(\" + a + \")\";\n writeTask(function () {\n n.classList.remove(\"segment-button-indicator-animated\");\n n.style.setProperty(\"transform\", l);\n n.getBoundingClientRect();\n n.classList.add(\"segment-button-indicator-animated\");\n n.style.setProperty(\"transform\", \"\");\n });\n this.value = e.value;\n this.setCheckedClasses();\n };\n\n t.prototype.setCheckedClasses = function () {\n var t = this;\n var e = this.getButtons();\n var o = e.findIndex(function (e) {\n return e.value === t.value;\n });\n var n = o + 1;\n this.checked = e.find(function (e) {\n return e.value === t.value;\n });\n\n for (var i = 0, r = e; i < r.length; i++) {\n var a = r[i];\n a.classList.remove(\"segment-button-after-checked\");\n }\n\n if (n < e.length) {\n e[n].classList.add(\"segment-button-after-checked\");\n }\n };\n\n t.prototype.setNextIndex = function (t, e) {\n var o = this;\n\n if (e === void 0) {\n e = false;\n }\n\n var n = document.dir === \"rtl\";\n var i = this.activated;\n var r = this.getButtons();\n var a = r.findIndex(function (t) {\n return t.value === o.value;\n });\n var s = r[a];\n var l;\n var c;\n\n if (a === -1) {\n return;\n }\n\n var d = s.getBoundingClientRect();\n var g = d.left;\n var u = d.width;\n var b = t.currentX;\n var h = d.top + d.height / 2;\n var m = document.elementFromPoint(b, h);\n var v = n ? b > g + u : b < g;\n var f = n ? b < g : b > g + u;\n\n if (i && !e) {\n if (v) {\n var p = a - 1;\n\n if (p >= 0) {\n c = p;\n }\n } else if (f) {\n if (i && !e) {\n var p = a + 1;\n\n if (p < r.length) {\n c = p;\n }\n }\n }\n\n if (c !== undefined && !r[c].disabled) {\n l = r[c];\n }\n }\n\n if (!i && e) {\n l = m;\n }\n\n if (l != null) {\n if (l.tagName === \"ION-SEGMENT\") {\n return false;\n }\n\n if (s !== l) {\n this.checkButton(s, l);\n }\n }\n\n return true;\n };\n\n t.prototype.emitStyle = function () {\n this.ionStyle.emit({\n segment: true\n });\n };\n\n t.prototype.render = function () {\n var t;\n var e = getIonMode(this);\n return h(Host, {\n role: \"tablist\",\n onClick: this.onClick,\n class: createColorClasses(this.color, (t = {}, t[e] = true, t[\"in-toolbar\"] = hostContext(\"ion-toolbar\", this.el), t[\"in-toolbar-color\"] = hostContext(\"ion-toolbar[color]\", this.el), t[\"segment-activated\"] = this.activated, t[\"segment-disabled\"] = this.disabled, t[\"segment-scrollable\"] = this.scrollable, t))\n }, h(\"slot\", null));\n };\n\n Object.defineProperty(t.prototype, \"el\", {\n get: function () {\n return getElement(this);\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(t, \"watchers\", {\n get: function () {\n return {\n color: [\"colorChanged\"],\n swipeGesture: [\"swipeGestureChanged\"],\n value: [\"valueChanged\"],\n disabled: [\"disabledChanged\"]\n };\n },\n enumerable: false,\n configurable: true\n });\n return t;\n}();\n\nSegment.style = {\n ios: segmentIosCss,\n md: segmentMdCss\n};\nvar segmentButtonIosCss = ':host{--color:initial;--color-hover:var(--color);--color-checked:var(--color);--color-disabled:var(--color);--padding-start:0;--padding-end:0;--padding-top:0;--padding-bottom:0;border-radius:var(--border-radius);display:-ms-flexbox;display:flex;position:relative;-ms-flex:1 1 auto;flex:1 1 auto;-ms-flex-direction:column;flex-direction:column;height:auto;background:var(--background);color:var(--color);text-decoration:none;text-overflow:ellipsis;white-space:nowrap;-webkit-font-kerning:none;font-kerning:none;cursor:pointer}.button-native{border-radius:0;font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;text-decoration:inherit;text-indent:inherit;text-overflow:inherit;text-transform:inherit;text-align:inherit;white-space:inherit;color:inherit;margin-left:var(--margin-start);margin-right:var(--margin-end);margin-top:var(--margin-top);margin-bottom:var(--margin-bottom);padding-left:var(--padding-start);padding-right:var(--padding-end);padding-top:var(--padding-top);padding-bottom:var(--padding-bottom);-webkit-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0);display:-ms-flexbox;display:flex;position:relative;-ms-flex-direction:inherit;flex-direction:inherit;-ms-flex-positive:1;flex-grow:1;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;width:100%;min-width:inherit;max-width:inherit;height:auto;min-height:inherit;max-height:inherit;-webkit-transition:var(--transition);transition:var(--transition);border:none;outline:none;background:transparent;contain:content;pointer-events:none;overflow:hidden;z-index:2}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){.button-native{margin-left:unset;margin-right:unset;-webkit-margin-start:var(--margin-start);margin-inline-start:var(--margin-start);-webkit-margin-end:var(--margin-end);margin-inline-end:var(--margin-end)}}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){.button-native{padding-left:unset;padding-right:unset;-webkit-padding-start:var(--padding-start);padding-inline-start:var(--padding-start);-webkit-padding-end:var(--padding-end);padding-inline-end:var(--padding-end)}}.button-native::after{left:0;right:0;top:0;bottom:0;position:absolute;content:\"\";opacity:0}.button-inner{display:-ms-flexbox;display:flex;position:relative;-ms-flex-flow:inherit;flex-flow:inherit;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;width:100%;height:100%;z-index:1}:host(.segment-button-checked){background:var(--background-checked);color:var(--color-checked)}:host(.segment-button-disabled){cursor:default;pointer-events:none}:host(.ion-focused) .button-native{color:var(--color-focused)}:host(.ion-focused) .button-native::after{background:var(--background-focused);opacity:var(--background-focused-opacity)}:host(:focus){outline:none}@media (any-hover: hover){:host(:hover) .button-native{color:var(--color-hover)}:host(:hover) .button-native::after{background:var(--background-hover);opacity:var(--background-hover-opacity)}:host(.segment-button-checked:hover) .button-native{color:var(--color-checked)}}::slotted(ion-icon){-ms-flex-negative:0;flex-shrink:0;-ms-flex-order:-1;order:-1;pointer-events:none}::slotted(ion-label){display:block;-ms-flex-item-align:center;align-self:center;line-height:22px;text-overflow:ellipsis;white-space:nowrap;-webkit-box-sizing:border-box;box-sizing:border-box;pointer-events:none}:host(.segment-button-layout-icon-top) .button-native{-ms-flex-direction:column;flex-direction:column}:host(.segment-button-layout-icon-start) .button-native{-ms-flex-direction:row;flex-direction:row}:host(.segment-button-layout-icon-end) .button-native{-ms-flex-direction:row-reverse;flex-direction:row-reverse}:host(.segment-button-layout-icon-bottom) .button-native{-ms-flex-direction:column-reverse;flex-direction:column-reverse}:host(.segment-button-layout-icon-hide) ::slotted(ion-icon){display:none}:host(.segment-button-layout-label-hide) ::slotted(ion-label){display:none}ion-ripple-effect{color:var(--ripple-color, var(--color-checked))}.segment-button-indicator{-webkit-transform-origin:left;transform-origin:left;position:absolute;opacity:0;-webkit-box-sizing:border-box;box-sizing:border-box;will-change:transform, opacity;pointer-events:none}.segment-button-indicator-background{width:100%;height:var(--indicator-height);-webkit-transform:var(--indicator-transform);transform:var(--indicator-transform);-webkit-box-shadow:var(--indicator-box-shadow);box-shadow:var(--indicator-box-shadow);pointer-events:none}.segment-button-indicator-animated{-webkit-transition:var(--indicator-transition);transition:var(--indicator-transition)}:host(.segment-button-checked) .segment-button-indicator{opacity:1}@media (prefers-reduced-motion: reduce){.segment-button-indicator-background{-webkit-transform:none;transform:none}.segment-button-indicator-animated{-webkit-transition:none;transition:none}}:host{--background:none;--background-checked:none;--background-hover:none;--background-hover-opacity:0;--background-focused:none;--background-focused-opacity:0;--border-radius:7px;--border-width:1px;--border-color:rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.12);--border-style:solid;--indicator-box-shadow:0 0 5px rgba(0, 0, 0, 0.16);--indicator-color:var(--ion-color-step-350, var(--ion-background-color, #fff));--indicator-height:100%;--indicator-transition:transform 260ms cubic-bezier(0.4, 0, 0.2, 1);--indicator-transform:none;--transition:100ms all linear;--padding-top:0;--padding-end:13px;--padding-bottom:0;--padding-start:13px;margin-top:2px;margin-bottom:2px;position:relative;-ms-flex-preferred-size:0;flex-basis:0;-ms-flex-direction:row;flex-direction:row;min-width:70px;min-height:28px;-webkit-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0);font-size:13px;font-weight:450;line-height:37px}:host::before{margin-left:0;margin-right:0;margin-top:5px;margin-bottom:5px;-webkit-transition:160ms opacity ease-in-out;transition:160ms opacity ease-in-out;-webkit-transition-delay:100ms;transition-delay:100ms;border-left:var(--border-width) var(--border-style) var(--border-color);content:\"\";opacity:1;will-change:opacity}:host(:first-of-type)::before{border-left-color:transparent}:host(.segment-button-disabled){opacity:0.3}::slotted(ion-icon){font-size:24px}:host(.segment-button-layout-icon-start) ::slotted(ion-label){margin-left:2px;margin-right:0}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){:host(.segment-button-layout-icon-start) ::slotted(ion-label){margin-left:unset;margin-right:unset;-webkit-margin-start:2px;margin-inline-start:2px;-webkit-margin-end:0;margin-inline-end:0}}:host(.segment-button-layout-icon-end) ::slotted(ion-label){margin-left:0;margin-right:2px}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){:host(.segment-button-layout-icon-end) ::slotted(ion-label){margin-left:unset;margin-right:unset;-webkit-margin-start:0;margin-inline-start:0;-webkit-margin-end:2px;margin-inline-end:2px}}.segment-button-indicator{padding-left:2px;padding-right:2px;left:0;right:0;top:0;bottom:0}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){.segment-button-indicator{padding-left:unset;padding-right:unset;-webkit-padding-start:2px;padding-inline-start:2px;-webkit-padding-end:2px;padding-inline-end:2px}}.segment-button-indicator-background{border-radius:var(--border-radius);background:var(--indicator-color)}.segment-button-indicator-background{-webkit-transition:var(--indicator-transition);transition:var(--indicator-transition)}:host(.segment-button-checked)::before,:host(.segment-button-after-checked)::before{opacity:0}:host(.segment-button-checked){z-index:-1}:host(.segment-button-activated){--indicator-transform:scale(0.95)}:host(.ion-focused) .button-native{opacity:0.7}@media (any-hover: hover){:host(:hover) .button-native{opacity:0.5}:host(.segment-button-checked:hover) .button-native{opacity:1}}:host(.in-segment-color){background:none;color:var(--ion-text-color, #000)}:host(.in-segment-color) .segment-button-indicator-background{background:var(--ion-color-step-350, var(--ion-background-color, #fff))}@media (any-hover: hover){:host(.in-segment-color:hover) .button-native,:host(.in-segment-color.segment-button-checked:hover) .button-native{color:var(--ion-text-color, #000)}}:host(.in-toolbar:not(.in-segment-color)){--background-checked:var(--ion-toolbar-segment-background-checked, none);--color:var(--ion-toolbar-segment-color, var(--ion-toolbar-color), initial);--color-checked:var(--ion-toolbar-segment-color-checked, var(--ion-toolbar-color), initial);--indicator-color:var(--ion-toolbar-segment-indicator-color, var(--ion-color-step-350, var(--ion-background-color, #fff)))}:host(.in-toolbar-color) .segment-button-indicator-background{background:#fff}:host(.in-toolbar-color:not(.in-segment-color)) .button-native{color:var(--ion-color-contrast)}:host(.in-toolbar-color.segment-button-checked:not(.in-segment-color)) .button-native{color:var(--ion-color-base)}@media (any-hover: hover){:host(.in-toolbar-color:not(.in-segment-color):hover) .button-native{color:var(--ion-color-contrast)}:host(.in-toolbar-color.segment-button-checked:not(.in-segment-color):hover) .button-native{color:var(--ion-color-base)}}';\nvar segmentButtonMdCss = ':host{--color:initial;--color-hover:var(--color);--color-checked:var(--color);--color-disabled:var(--color);--padding-start:0;--padding-end:0;--padding-top:0;--padding-bottom:0;border-radius:var(--border-radius);display:-ms-flexbox;display:flex;position:relative;-ms-flex:1 1 auto;flex:1 1 auto;-ms-flex-direction:column;flex-direction:column;height:auto;background:var(--background);color:var(--color);text-decoration:none;text-overflow:ellipsis;white-space:nowrap;-webkit-font-kerning:none;font-kerning:none;cursor:pointer}.button-native{border-radius:0;font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;text-decoration:inherit;text-indent:inherit;text-overflow:inherit;text-transform:inherit;text-align:inherit;white-space:inherit;color:inherit;margin-left:var(--margin-start);margin-right:var(--margin-end);margin-top:var(--margin-top);margin-bottom:var(--margin-bottom);padding-left:var(--padding-start);padding-right:var(--padding-end);padding-top:var(--padding-top);padding-bottom:var(--padding-bottom);-webkit-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0);display:-ms-flexbox;display:flex;position:relative;-ms-flex-direction:inherit;flex-direction:inherit;-ms-flex-positive:1;flex-grow:1;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;width:100%;min-width:inherit;max-width:inherit;height:auto;min-height:inherit;max-height:inherit;-webkit-transition:var(--transition);transition:var(--transition);border:none;outline:none;background:transparent;contain:content;pointer-events:none;overflow:hidden;z-index:2}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){.button-native{margin-left:unset;margin-right:unset;-webkit-margin-start:var(--margin-start);margin-inline-start:var(--margin-start);-webkit-margin-end:var(--margin-end);margin-inline-end:var(--margin-end)}}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){.button-native{padding-left:unset;padding-right:unset;-webkit-padding-start:var(--padding-start);padding-inline-start:var(--padding-start);-webkit-padding-end:var(--padding-end);padding-inline-end:var(--padding-end)}}.button-native::after{left:0;right:0;top:0;bottom:0;position:absolute;content:\"\";opacity:0}.button-inner{display:-ms-flexbox;display:flex;position:relative;-ms-flex-flow:inherit;flex-flow:inherit;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;width:100%;height:100%;z-index:1}:host(.segment-button-checked){background:var(--background-checked);color:var(--color-checked)}:host(.segment-button-disabled){cursor:default;pointer-events:none}:host(.ion-focused) .button-native{color:var(--color-focused)}:host(.ion-focused) .button-native::after{background:var(--background-focused);opacity:var(--background-focused-opacity)}:host(:focus){outline:none}@media (any-hover: hover){:host(:hover) .button-native{color:var(--color-hover)}:host(:hover) .button-native::after{background:var(--background-hover);opacity:var(--background-hover-opacity)}:host(.segment-button-checked:hover) .button-native{color:var(--color-checked)}}::slotted(ion-icon){-ms-flex-negative:0;flex-shrink:0;-ms-flex-order:-1;order:-1;pointer-events:none}::slotted(ion-label){display:block;-ms-flex-item-align:center;align-self:center;line-height:22px;text-overflow:ellipsis;white-space:nowrap;-webkit-box-sizing:border-box;box-sizing:border-box;pointer-events:none}:host(.segment-button-layout-icon-top) .button-native{-ms-flex-direction:column;flex-direction:column}:host(.segment-button-layout-icon-start) .button-native{-ms-flex-direction:row;flex-direction:row}:host(.segment-button-layout-icon-end) .button-native{-ms-flex-direction:row-reverse;flex-direction:row-reverse}:host(.segment-button-layout-icon-bottom) .button-native{-ms-flex-direction:column-reverse;flex-direction:column-reverse}:host(.segment-button-layout-icon-hide) ::slotted(ion-icon){display:none}:host(.segment-button-layout-label-hide) ::slotted(ion-label){display:none}ion-ripple-effect{color:var(--ripple-color, var(--color-checked))}.segment-button-indicator{-webkit-transform-origin:left;transform-origin:left;position:absolute;opacity:0;-webkit-box-sizing:border-box;box-sizing:border-box;will-change:transform, opacity;pointer-events:none}.segment-button-indicator-background{width:100%;height:var(--indicator-height);-webkit-transform:var(--indicator-transform);transform:var(--indicator-transform);-webkit-box-shadow:var(--indicator-box-shadow);box-shadow:var(--indicator-box-shadow);pointer-events:none}.segment-button-indicator-animated{-webkit-transition:var(--indicator-transition);transition:var(--indicator-transition)}:host(.segment-button-checked) .segment-button-indicator{opacity:1}@media (prefers-reduced-motion: reduce){.segment-button-indicator-background{-webkit-transform:none;transform:none}.segment-button-indicator-animated{-webkit-transition:none;transition:none}}:host{--background:none;--background-checked:none;--background-hover:var(--color-checked);--background-focused:var(--color-checked);--background-activated-opacity:0;--background-focused-opacity:.12;--background-hover-opacity:.04;--color:rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.6);--color-checked:var(--ion-color-primary, #3880ff);--indicator-box-shadow:none;--indicator-color:var(--color-checked);--indicator-height:2px;--indicator-transition:transform 250ms cubic-bezier(0.4, 0, 0.2, 1);--indicator-transform:none;--padding-top:0;--padding-end:16px;--padding-bottom:0;--padding-start:16px;--transition:color 0.15s linear 0s, opacity 0.15s linear 0s;min-width:90px;max-width:360px;min-height:48px;border-width:var(--border-width);border-style:var(--border-style);border-color:var(--border-color);font-size:14px;font-weight:500;letter-spacing:0.06em;line-height:40px;text-transform:uppercase}:host(.segment-button-disabled){opacity:0.3}:host(.in-segment-color){background:none;color:rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.6)}:host(.in-segment-color) ion-ripple-effect{color:var(--ion-color-base)}:host(.in-segment-color) .segment-button-indicator-background{background:var(--ion-color-base)}:host(.in-segment-color.segment-button-checked) .button-native{color:var(--ion-color-base)}:host(.in-segment-color.ion-focused) .button-native::after{background:var(--ion-color-base)}@media (any-hover: hover){:host(.in-segment-color:hover) .button-native{color:rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.6)}:host(.in-segment-color:hover) .button-native::after{background:var(--ion-color-base)}:host(.in-segment-color.segment-button-checked:hover) .button-native{color:var(--ion-color-base)}}:host(.in-toolbar:not(.in-segment-color)){--background:var(--ion-toolbar-segment-background, none);--background-checked:var(--ion-toolbar-segment-background-checked, none);--color:var(--ion-toolbar-segment-color, rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.6));--color-checked:var(--ion-toolbar-segment-color-checked, var(--ion-color-primary, #3880ff));--indicator-color:var(--ion-toolbar-segment-color-checked, var(--color-checked))}:host(.in-toolbar-color:not(.in-segment-color)) .button-native{color:rgba(var(--ion-color-contrast-rgb), 0.6)}:host(.in-toolbar-color.segment-button-checked:not(.in-segment-color)) .button-native{color:var(--ion-color-contrast)}@media (any-hover: hover){:host(.in-toolbar-color:not(.in-segment-color)) .button-native::after{background:var(--ion-color-contrast)}}::slotted(ion-icon){margin-top:12px;margin-bottom:12px;font-size:24px}::slotted(ion-label){margin-top:12px;margin-bottom:12px}:host(.segment-button-layout-icon-top) ::slotted(ion-label),:host(.segment-button-layout-icon-bottom) ::slotted(ion-icon){margin-top:0}:host(.segment-button-layout-icon-top) ::slotted(ion-icon),:host(.segment-button-layout-icon-bottom) ::slotted(ion-label){margin-bottom:0}:host(.segment-button-layout-icon-start) ::slotted(ion-label){margin-left:8px;margin-right:0}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){:host(.segment-button-layout-icon-start) ::slotted(ion-label){margin-left:unset;margin-right:unset;-webkit-margin-start:8px;margin-inline-start:8px;-webkit-margin-end:0;margin-inline-end:0}}:host(.segment-button-layout-icon-end) ::slotted(ion-label){margin-left:0;margin-right:8px}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){:host(.segment-button-layout-icon-end) ::slotted(ion-label){margin-left:unset;margin-right:unset;-webkit-margin-start:0;margin-inline-start:0;-webkit-margin-end:8px;margin-inline-end:8px}}:host(.segment-button-has-icon-only) ::slotted(ion-icon){margin-top:12px;margin-bottom:12px}:host(.segment-button-has-label-only) ::slotted(ion-label){margin-top:12px;margin-bottom:12px}.segment-button-indicator{left:0;right:0;bottom:0}.segment-button-indicator-background{background:var(--indicator-color)}:host(.in-toolbar:not(.in-segment-color)) .segment-button-indicator-background{background:var(--ion-toolbar-segment-indicator-color, var(--indicator-color))}:host(.in-toolbar-color:not(.in-segment-color)) .segment-button-indicator-background{background:var(--ion-color-contrast)}';\nvar ids = 0;\n\nvar SegmentButton = function () {\n function t(t) {\n var e = this;\n registerInstance(this, t);\n this.segmentEl = null;\n this.checked = false;\n this.disabled = false;\n this.layout = \"icon-top\";\n this.type = \"button\";\n this.value = \"ion-sb-\" + ids++;\n\n this.updateStyle = function () {\n forceUpdate(e);\n };\n\n this.updateState = function () {\n if (e.segmentEl) {\n e.checked = e.segmentEl.value === e.value;\n }\n };\n }\n\n t.prototype.connectedCallback = function () {\n var t = this.segmentEl = this.el.closest(\"ion-segment\");\n\n if (t) {\n this.updateState();\n addEventListener(t, \"ionSelect\", this.updateState);\n addEventListener(t, \"ionStyle\", this.updateStyle);\n }\n };\n\n t.prototype.disconnectedCallback = function () {\n var t = this.segmentEl;\n\n if (t) {\n removeEventListener(t, \"ionSelect\", this.updateState);\n removeEventListener(t, \"ionStyle\", this.updateStyle);\n this.segmentEl = null;\n }\n };\n\n Object.defineProperty(t.prototype, \"hasLabel\", {\n get: function () {\n return !!this.el.querySelector(\"ion-label\");\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(t.prototype, \"hasIcon\", {\n get: function () {\n return !!this.el.querySelector(\"ion-icon\");\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(t.prototype, \"tabIndex\", {\n get: function () {\n if (this.disabled) {\n return -1;\n }\n\n var t = this.el.hasAttribute(\"tabindex\");\n\n if (t) {\n return this.el.getAttribute(\"tabindex\");\n }\n\n return 0;\n },\n enumerable: false,\n configurable: true\n });\n\n t.prototype.render = function () {\n var t;\n var e = this,\n o = e.checked,\n n = e.type,\n i = e.disabled,\n r = e.hasIcon,\n a = e.hasLabel,\n s = e.layout,\n l = e.segmentEl,\n c = e.tabIndex;\n var d = getIonMode(this);\n\n var g = function () {\n return l !== null && l.color !== undefined;\n };\n\n return h(Host, {\n role: \"tab\",\n \"aria-selected\": o ? \"true\" : \"false\",\n \"aria-disabled\": i ? \"true\" : null,\n tabIndex: c,\n class: (t = {}, t[d] = true, t[\"in-toolbar\"] = hostContext(\"ion-toolbar\", this.el), t[\"in-toolbar-color\"] = hostContext(\"ion-toolbar[color]\", this.el), t[\"in-segment\"] = hostContext(\"ion-segment\", this.el), t[\"in-segment-color\"] = g(), t[\"segment-button-has-label\"] = a, t[\"segment-button-has-icon\"] = r, t[\"segment-button-has-label-only\"] = a && !r, t[\"segment-button-has-icon-only\"] = r && !a, t[\"segment-button-disabled\"] = i, t[\"segment-button-checked\"] = o, t[\"segment-button-layout-\" + s] = true, t[\"ion-activatable\"] = true, t[\"ion-activatable-instant\"] = true, t[\"ion-focusable\"] = true, t)\n }, h(\"button\", {\n type: n,\n tabIndex: -1,\n class: \"button-native\",\n part: \"native\",\n disabled: i\n }, h(\"span\", {\n class: \"button-inner\"\n }, h(\"slot\", null)), d === \"md\" && h(\"ion-ripple-effect\", null)), h(\"div\", {\n part: \"indicator\",\n class: {\n \"segment-button-indicator\": true,\n \"segment-button-indicator-animated\": true\n }\n }, h(\"div\", {\n part: \"indicator-background\",\n class: \"segment-button-indicator-background\"\n })));\n };\n\n Object.defineProperty(t.prototype, \"el\", {\n get: function () {\n return getElement(this);\n },\n enumerable: false,\n configurable: true\n });\n return t;\n}();\n\nSegmentButton.style = {\n ios: segmentButtonIosCss,\n md: segmentButtonMdCss\n};\nexport { Segment as ion_segment, SegmentButton as ion_segment_button };","map":{"version":3,"sources":["/Users/adekanbidansteve/github/klasha/react-klasha/ionic-test/node_modules/@ionic/core/dist/esm-es5/ion-segment_2.entry.js"],"names":["__awaiter","__generator","r","registerInstance","e","createEvent","c","writeTask","h","H","Host","i","getElement","j","forceUpdate","config","b","getIonMode","p","pointerCoord","a","addEventListener","removeEventListener","createColorClasses","hostContext","segmentIosCss","segmentMdCss","Segment","t","ionChange","ionSelect","ionStyle","didInit","activated","disabled","scrollable","swipeGesture","onClick","o","target","n","checked","tagName","value","checkButton","setCheckedClasses","prototype","colorChanged","undefined","emitStyle","swipeGestureChanged","gestureChanged","valueChanged","emit","valueAfterGesture","disabledChanged","getButtons","length","gesture","enable","connectedCallback","componentWillLoad","componentDidLoad","label","sent","createGesture","el","gestureName","gesturePriority","threshold","passive","onStart","onMove","onEnd","activate","setNextIndex","setActivated","event","stopImmediatePropagation","addRipple","Array","from","querySelectorAll","getBoolean","find","shadowRoot","querySelector","s","l","x","y","then","forEach","classList","add","remove","getIndicator","getBoundingClientRect","width","left","style","setProperty","findIndex","document","dir","d","g","u","currentX","top","height","m","elementFromPoint","v","f","segment","render","role","class","color","Object","defineProperty","get","enumerable","configurable","ios","md","segmentButtonIosCss","segmentButtonMdCss","ids","SegmentButton","segmentEl","layout","type","updateStyle","updateState","closest","disconnectedCallback","hasAttribute","getAttribute","hasIcon","hasLabel","tabIndex","part","ion_segment","ion_segment_button"],"mappings":"AAAA,SAAOA,SAAP,EAAiBC,WAAjB,QAAiC,OAAjC;AAAyC,SAAOC,CAAC,IAAIC,gBAAZ,EAA6BC,CAAC,IAAIC,WAAlC,EAA8CC,CAAC,IAAIC,SAAnD,EAA6DC,CAA7D,EAA+DC,CAAC,IAAIC,IAApE,EAAyEC,CAAC,IAAIC,UAA9E,EAAyFC,CAAC,IAAIC,WAA9F,QAA8G,qBAA9G;AAAoI,SAAOR,CAAC,IAAIS,MAAZ,EAAmBC,CAAC,IAAIC,UAAxB,QAAuC,4BAAvC;AAAoE,SAAOC,CAAC,IAAIC,YAAZ,EAAyBC,CAAC,IAAIC,gBAA9B,EAA+CL,CAAC,IAAIM,mBAApD,QAA4E,uBAA5E;AAAoG,SAAOhB,CAAC,IAAIiB,kBAAZ,EAA+Bf,CAAC,IAAIgB,WAApC,QAAoD,qBAApD;AAA0E,IAAIC,aAAa,GAAC,uyCAAlB;AAA0zC,IAAIC,YAAY,GAAC,8rBAAjB;;AAAgtB,IAAIC,OAAO,GAAC,YAAU;AAAC,WAASC,CAAT,CAAWA,CAAX,EAAa;AAAC,QAAIxB,CAAC,GAAC,IAAN;AAAWD,IAAAA,gBAAgB,CAAC,IAAD,EAAMyB,CAAN,CAAhB;AAAyB,SAAKC,SAAL,GAAexB,WAAW,CAAC,IAAD,EAAM,WAAN,EAAkB,CAAlB,CAA1B;AAA+C,SAAKyB,SAAL,GAAezB,WAAW,CAAC,IAAD,EAAM,WAAN,EAAkB,CAAlB,CAA1B;AAA+C,SAAK0B,QAAL,GAAc1B,WAAW,CAAC,IAAD,EAAM,UAAN,EAAiB,C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