1 line
42 KiB
Plaintext
1 line
42 KiB
Plaintext
{"version":3,"sources":["webpack:///node_modules/@ionic/core/dist/esm/ion-searchbar.entry.js"],"names":["searchbarIosCss","searchbarMdCss","Searchbar","hostRef","ionInput","ionChange","ionCancel","ionClear","ionBlur","ionFocus","ionStyle","isCancelVisible","shouldAlignLeft","focused","noAnimate","animated","autocomplete","autocorrect","cancelButtonIcon","get","cancelButtonText","debounce","disabled","placeholder","showCancelButton","spellcheck","type","value","onClearInput","ev","emit","preventDefault","stopPropagation","setTimeout","getValue","onCancelSearchbar","nativeInput","blur","onInput","input","target","onBlur","positionElements","onFocus","inputEl","requestAnimationFrame","emitStyle","debounceChanged","focus","Promise","resolve","prevAlignLeft","mode","trim","positionPlaceholder","positionCancelButton","isRTL","document","dir","iconEl","el","shadowRoot","querySelector","removeAttribute","doc","tempSpan","createElement","innerText","body","appendChild","textWidth","offsetWidth","remove","inputLeft","iconLeft","style","paddingRight","marginRight","paddingLeft","marginLeft","cancelButton","shouldShowCancel","shouldShowCancelButton","cancelStyle","offset","getBoolean","clearIcon","searchIcon","undefined","tabIndex","onMouseDown","onTouchStart","icon","lazy","role","color","hasValue","ref","inputMode","inputmode","enterKeyHint","enterkeyhint","autoComplete","autoCorrect","ios","md"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;;;AAAA;AAAA;AAAA;AAAA;;;AAAA;AAAA;AAAA;AAAA;;;AAAA;AAAA;AAAA;AAAA;;;AAAA;AAAA;AAAA;AAAA;;;AAAA;AAAA;AAAA;;AAKA,UAAMA,eAAe,GAAG,svUAAxB;AAEA,UAAMC,cAAc,GAAG,kvPAAvB;;AAEA,UAAMC,SAAS;AACX,2BAAYC,OAAZ,EAAqB;AAAA;;AAAA;;AACjB,uEAAiB,IAAjB,EAAuBA,OAAvB;AACA,eAAKC,QAAL,GAAgB,6DAAY,IAAZ,EAAkB,UAAlB,EAA8B,CAA9B,CAAhB;AACA,eAAKC,SAAL,GAAiB,6DAAY,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AIpB;AA9TO;;AAAA;AAAA,SAAf;;AAgUA9E,eAAS,CAACyE,KAAV,GAAkB;AACd6B,WAAG,EAAExG,eADS;AAEdyG,UAAE,EAAExG;AAFU,OAAlB","file":"30-es5.js","sourcesContent":["import { r as registerInstance, e as createEvent, j as forceUpdate, h, H as Host, i as getElement } from './index-92848855.js';\nimport { c as config, b as getIonMode } from './ionic-global-23e7365a.js';\nimport { d as debounceEvent, r as raf } from './helpers-5c745fbd.js';\nimport { c as createColorClasses } from './theme-5641d27f.js';\n\nconst searchbarIosCss = \".sc-ion-searchbar-ios-h{--placeholder-color:initial;--placeholder-font-style:initial;--placeholder-font-weight:initial;--placeholder-opacity:.5;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;display:-ms-flexbox;display:flex;position:relative;-ms-flex-align:center;align-items:center;width:100%;color:var(--color);font-family:var(--ion-font-family, inherit);-webkit-box-sizing:border-box;box-sizing:border-box}.ion-color.sc-ion-searchbar-ios-h{color:var(--ion-color-contrast)}.ion-color.sc-ion-searchbar-ios-h .searchbar-input.sc-ion-searchbar-ios{background:var(--ion-color-base)}.ion-color.sc-ion-searchbar-ios-h .searchbar-clear-button.sc-ion-searchbar-ios,.ion-color.sc-ion-searchbar-ios-h .searchbar-cancel-button.sc-ion-searchbar-ios,.ion-color.sc-ion-searchbar-ios-h .searchbar-search-icon.sc-ion-searchbar-ios{color:inherit}.searchbar-search-icon.sc-ion-searchbar-ios{color:var(--icon-color);pointer-events:none}.searchbar-input-container.sc-ion-searchbar-ios{display:block;position:relative;-ms-flex-negative:1;flex-shrink:1;width:100%}.searchbar-input.sc-ion-searchbar-ios{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;border-radius:var(--border-radius);display:block;width:100%;border:0;outline:none;background:var(--background);font-family:inherit;-webkit-box-shadow:var(--box-shadow);box-shadow:var(--box-shadow);-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-appearance:none;-moz-appearance:none;appearance:none}.searchbar-input.sc-ion-searchbar-ios::-webkit-input-placeholder{color:var(--placeholder-color);font-family:inherit;font-style:var(--placeholder-font-style);font-weight:var(--placeholder-font-weight);opacity:var(--placeholder-opacity)}.searchbar-input.sc-ion-searchbar-ios::-moz-placeholder{color:var(--placeholder-color);font-family:inherit;font-style:var(--placeholder-font-style);font-weight:var(--placeholder-font-weight);opacity:var(--placeholder-opacity)}.searchbar-input.sc-ion-searchbar-ios:-ms-input-placeholder{color:var(--placeholder-color);font-family:inherit;font-style:var(--placeholder-font-style);font-weight:var(--placeholder-font-weight);opacity:var(--placeholder-opacity)}.searchbar-input.sc-ion-searchbar-ios::-ms-input-placeholder{color:var(--placeholder-color);font-family:inherit;font-style:var(--placeholder-font-style);font-weight:var(--placeholder-font-weight);opacity:var(--placeholder-opacity)}.searchbar-input.sc-ion-searchbar-ios::placeholder{color:var(--placeholder-color);font-family:inherit;font-style:var(--placeholder-font-style);font-weight:var(--placeholder-font-weight);opacity:var(--placeholder-opacity)}.searchbar-input.sc-ion-searchbar-ios::-webkit-search-cancel-button,.searchbar-input.sc-ion-searchbar-ios::-ms-clear{display:none}.searchbar-cancel-button.sc-ion-searchbar-ios{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;display:none;height:100%;border:0;outline:none;color:var(--cancel-button-color);cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none}.searchbar-cancel-button.sc-ion-searchbar-ios>div.sc-ion-searchbar-ios{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;width:100%;height:100%}.searchbar-clear-button.sc-ion-searchbar-ios{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;padding-left:0;padding-right:0;padding-top:0;padding-bottom:0;display:none;min-height:0;outline:none;color:var(--clear-button-color);-webkit-appearance:none;-moz-appearance:none;appearance:none}.searchbar-has-value.searchbar-has-focus.sc-ion-searchbar-ios-h .searchbar-clear-button.sc-ion-searchbar-ios{display:block}.searchbar-disabled.sc-ion-searchbar-ios-h{cursor:default;opacity:0.4;pointer-events:none}.sc-ion-searchbar-ios-h{--background:rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.07);--border-radius:10px;--box-shadow:none;--cancel-button-color:var(--ion-color-primary, #3880ff);--clear-button-color:var(--ion-color-step-600, #666666);--color:var(--ion-text-color, #000);--icon-color:var(--ion-color-step-600, #666666);padding-left:12px;padding-right:12px;padding-top:12px;padding-bottom:12px;height:60px;contain:strict}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){.sc-ion-searchbar-ios-h{padding-left:unset;padding-right:unset;-webkit-padding-start:12px;padding-inline-start:12px;-webkit-padding-end:12px;padding-inline-end:12px}}.searchbar-input-container.sc-ion-searchbar-ios{height:36px}.searchbar-search-icon.sc-ion-searchbar-ios{margin-left:calc(50% - 60px);left:5px;top:0;position:absolute;width:22px;height:100%;contain:strict}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){.searchbar-search-icon.sc-ion-searchbar-ios{margin-left:unset;-webkit-margin-start:calc(50% - 60px);margin-inline-start:calc(50% - 60px)}}[dir=rtl].sc-ion-searchbar-ios .searchbar-search-icon.sc-ion-searchbar-ios,[dir=rtl].sc-ion-searchbar-ios-h .searchbar-search-icon.sc-ion-searchbar-ios,[dir=rtl] .sc-ion-searchbar-ios-h .searchbar-search-icon.sc-ion-searchbar-ios{left:unset;right:unset;right:5px}.searchbar-input.sc-ion-searchbar-ios{padding-left:28px;padding-right:28px;padding-top:0;padding-bottom:0;height:100%;font-size:17px;font-weight:400;contain:strict}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){.searchbar-input.sc-ion-searchbar-ios{padding-left:unset;padding-right:unset;-webkit-padding-start:28px;padding-inline-start:28px;-webkit-padding-end:28px;padding-inline-end:28px}}.searchbar-clear-button.sc-ion-searchbar-ios{right:0;top:0;background-position:center;position:absolute;width:30px;height:100%;border:0;background-color:transparent}[dir=rtl].sc-ion-searchbar-ios .searchbar-clear-button.sc-ion-searchbar-ios,[dir=rtl].sc-ion-searchbar-ios-h .searchbar-clear-button.sc-ion-searchbar-ios,[dir=rtl] .sc-ion-searchbar-ios-h .searchbar-clear-button.sc-ion-searchbar-ios{left:unset;right:unset;left:0}.searchbar-clear-icon.sc-ion-searchbar-ios{width:18px;height:100%}.searchbar-cancel-button.sc-ion-searchbar-ios{padding-left:8px;padding-right:0;padding-top:0;padding-bottom:0;-ms-flex-negative:0;flex-shrink:0;background-color:transparent;font-size:16px}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){.searchbar-cancel-button.sc-ion-searchbar-ios{padding-left:unset;padding-right:unset;-webkit-padding-start:8px;padding-inline-start:8px;-webkit-padding-end:0;padding-inline-end:0}}.searchbar-left-aligned.sc-ion-searchbar-ios-h .searchbar-search-icon.sc-ion-searchbar-ios{margin-left:0}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){.searchbar-left-aligned.sc-ion-searchbar-ios-h .searchbar-search-icon.sc-ion-searchbar-ios{margin-left:unset;-webkit-margin-start:0;margin-inline-start:0}}.searchbar-left-aligned.sc-ion-searchbar-ios-h .searchbar-input.sc-ion-searchbar-ios{padding-left:30px}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){.searchbar-left-aligned.sc-ion-searchbar-ios-h .searchbar-input.sc-ion-searchbar-ios{padding-left:unset;-webkit-padding-start:30px;padding-inline-start:30px}}.searchbar-has-focus.sc-ion-searchbar-ios-h .searchbar-cancel-button.sc-ion-searchbar-ios,.searchbar-should-show-cancel.sc-ion-searchbar-ios-h .searchbar-cancel-button.sc-ion-searchbar-ios,.searchbar-animated.sc-ion-searchbar-ios-h .searchbar-cancel-button.sc-ion-searchbar-ios{display:block}.searchbar-animated.sc-ion-searchbar-ios-h .searchbar-search-icon.sc-ion-searchbar-ios,.searchbar-animated.sc-ion-searchbar-ios-h .searchbar-input.sc-ion-searchbar-ios{-webkit-transition:all 300ms ease;transition:all 300ms ease}.searchbar-animated.searchbar-has-focus.sc-ion-searchbar-ios-h .searchbar-cancel-button.sc-ion-searchbar-ios,.searchbar-animated.searchbar-should-show-cancel.sc-ion-searchbar-ios-h .searchbar-cancel-button.sc-ion-searchbar-ios{opacity:1;pointer-events:auto}.searchbar-animated.sc-ion-searchbar-ios-h .searchbar-cancel-button.sc-ion-searchbar-ios{margin-right:-100%;-webkit-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0);-webkit-transition:all 300ms ease;transition:all 300ms ease;opacity:0;pointer-events:none}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){.searchbar-animated.sc-ion-searchbar-ios-h .searchbar-cancel-button.sc-ion-searchbar-ios{margin-right:unset;-webkit-margin-end:-100%;margin-inline-end:-100%}}.searchbar-no-animate.sc-ion-searchbar-ios-h .searchbar-search-icon.sc-ion-searchbar-ios,.searchbar-no-animate.sc-ion-searchbar-ios-h .searchbar-input.sc-ion-searchbar-ios,.searchbar-no-animate.sc-ion-searchbar-ios-h .searchbar-cancel-button.sc-ion-searchbar-ios{-webkit-transition-duration:0ms;transition-duration:0ms}.ion-color.sc-ion-searchbar-ios-h .searchbar-cancel-button.sc-ion-searchbar-ios{color:var(--ion-color-base)}@media (any-hover: hover){.ion-color.sc-ion-searchbar-ios-h .searchbar-cancel-button.sc-ion-searchbar-ios:hover{color:var(--ion-color-tint)}}ion-toolbar.sc-ion-searchbar-ios-h,ion-toolbar .sc-ion-searchbar-ios-h{padding-top:1px;padding-bottom:15px;height:52px}ion-toolbar.ion-color.sc-ion-searchbar-ios-h:not(.ion-color),ion-toolbar.ion-color .sc-ion-searchbar-ios-h:not(.ion-color){color:inherit}ion-toolbar.ion-color.sc-ion-searchbar-ios-h:not(.ion-color) .searchbar-cancel-button.sc-ion-searchbar-ios,ion-toolbar.ion-color .sc-ion-searchbar-ios-h:not(.ion-color) .searchbar-cancel-button.sc-ion-searchbar-ios{color:currentColor}ion-toolbar.ion-color.sc-ion-searchbar-ios-h .searchbar-search-icon.sc-ion-searchbar-ios,ion-toolbar.ion-color .sc-ion-searchbar-ios-h .searchbar-search-icon.sc-ion-searchbar-ios{color:currentColor;opacity:0.5}ion-toolbar.ion-color.sc-ion-searchbar-ios-h:not(.ion-color) .searchbar-input.sc-ion-searchbar-ios,ion-toolbar.ion-color .sc-ion-searchbar-ios-h:not(.ion-color) .searchbar-input.sc-ion-searchbar-ios{background:rgba(var(--ion-color-contrast-rgb), 0.07);color:currentColor}ion-toolbar.ion-color.sc-ion-searchbar-ios-h:not(.ion-color) .searchbar-clear-button.sc-ion-searchbar-ios,ion-toolbar.ion-color .sc-ion-searchbar-ios-h:not(.ion-color) .searchbar-clear-button.sc-ion-searchbar-ios{color:currentColor;opacity:0.5}\";\n\nconst searchbarMdCss = \".sc-ion-searchbar-md-h{--placeholder-color:initial;--placeholder-font-style:initial;--placeholder-font-weight:initial;--placeholder-opacity:.5;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;display:-ms-flexbox;display:flex;position:relative;-ms-flex-align:center;align-items:center;width:100%;color:var(--color);font-family:var(--ion-font-family, inherit);-webkit-box-sizing:border-box;box-sizing:border-box}.ion-color.sc-ion-searchbar-md-h{color:var(--ion-color-contrast)}.ion-color.sc-ion-searchbar-md-h .searchbar-input.sc-ion-searchbar-md{background:var(--ion-color-base)}.ion-color.sc-ion-searchbar-md-h .searchbar-clear-button.sc-ion-searchbar-md,.ion-color.sc-ion-searchbar-md-h .searchbar-cancel-button.sc-ion-searchbar-md,.ion-color.sc-ion-searchbar-md-h .searchbar-search-icon.sc-ion-searchbar-md{color:inherit}.searchbar-search-icon.sc-ion-searchbar-md{color:var(--icon-color);pointer-events:none}.searchbar-input-container.sc-ion-searchbar-md{display:block;position:relative;-ms-flex-negative:1;flex-shrink:1;width:100%}.searchbar-input.sc-ion-searchbar-md{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;border-radius:var(--border-radius);display:block;width:100%;border:0;outline:none;background:var(--background);font-family:inherit;-webkit-box-shadow:var(--box-shadow);box-shadow:var(--box-shadow);-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-appearance:none;-moz-appearance:none;appearance:none}.searchbar-input.sc-ion-searchbar-md::-webkit-input-placeholder{color:var(--placeholder-color);font-family:inherit;font-style:var(--placeholder-font-style);font-weight:var(--placeholder-font-weight);opacity:var(--placeholder-opacity)}.searchbar-input.sc-ion-searchbar-md::-moz-placeholder{color:var(--placeholder-color);font-family:inherit;font-style:var(--placeholder-font-style);font-weight:var(--placeholder-font-weight);opacity:var(--placeholder-opacity)}.searchbar-input.sc-ion-searchbar-md:-ms-input-placeholder{color:var(--placeholder-color);font-family:inherit;font-style:var(--placeholder-font-style);font-weight:var(--placeholder-font-weight);opacity:var(--placeholder-opacity)}.searchbar-input.sc-ion-searchbar-md::-ms-input-placeholder{color:var(--placeholder-color);font-family:inherit;font-style:var(--placeholder-font-style);font-weight:var(--placeholder-font-weight);opacity:var(--placeholder-opacity)}.searchbar-input.sc-ion-searchbar-md::placeholder{color:var(--placeholder-color);font-family:inherit;font-style:var(--placeholder-font-style);font-weight:var(--placeholder-font-weight);opacity:var(--placeholder-opacity)}.searchbar-input.sc-ion-searchbar-md::-webkit-search-cancel-button,.searchbar-input.sc-ion-searchbar-md::-ms-clear{display:none}.searchbar-cancel-button.sc-ion-searchbar-md{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;display:none;height:100%;border:0;outline:none;color:var(--cancel-button-color);cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none}.searchbar-cancel-button.sc-ion-searchbar-md>div.sc-ion-searchbar-md{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;width:100%;height:100%}.searchbar-clear-button.sc-ion-searchbar-md{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;padding-left:0;padding-right:0;padding-top:0;padding-bottom:0;display:none;min-height:0;outline:none;color:var(--clear-button-color);-webkit-appearance:none;-moz-appearance:none;appearance:none}.searchbar-has-value.searchbar-has-focus.sc-ion-searchbar-md-h .searchbar-clear-button.sc-ion-searchbar-md{display:block}.searchbar-disabled.sc-ion-searchbar-md-h{cursor:default;opacity:0.4;pointer-events:none}.sc-ion-searchbar-md-h{--background:var(--ion-background-color, #fff);--border-radius:2px;--box-shadow:0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 3px 1px -2px rgba(0, 0, 0, 0.2), 0 1px 5px 0 rgba(0, 0, 0, 0.12);--cancel-button-color:var(--ion-color-step-900, #1a1a1a);--clear-button-color:initial;--color:var(--ion-color-step-850, #262626);--icon-color:var(--ion-color-step-600, #666666);padding-left:8px;padding-right:8px;padding-top:8px;padding-bottom:8px;background:inherit}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){.sc-ion-searchbar-md-h{padding-left:unset;padding-right:unset;-webkit-padding-start:8px;padding-inline-start:8px;-webkit-padding-end:8px;padding-inline-end:8px}}.searchbar-search-icon.sc-ion-searchbar-md{left:16px;top:11px;width:21px;height:21px}[dir=rtl].sc-ion-searchbar-md .searchbar-search-icon.sc-ion-searchbar-md,[dir=rtl].sc-ion-searchbar-md-h .searchbar-search-icon.sc-ion-searchbar-md,[dir=rtl] .sc-ion-searchbar-md-h .searchbar-search-icon.sc-ion-searchbar-md{left:unset;right:unset;right:16px}.searchbar-cancel-button.sc-ion-searchbar-md{left:5px;top:0;background-color:transparent;font-size:1.6em}[dir=rtl].sc-ion-searchbar-md .searchbar-cancel-button.sc-ion-searchbar-md,[dir=rtl].sc-ion-searchbar-md-h .searchbar-cancel-button.sc-ion-searchbar-md,[dir=rtl] .sc-ion-searchbar-md-h .searchbar-cancel-button.sc-ion-searchbar-md{left:unset;right:unset;right:5px}.searchbar-search-icon.sc-ion-searchbar-md,.searchbar-cancel-button.sc-ion-searchbar-md{position:absolute}.searchbar-search-icon.ion-activated.sc-ion-searchbar-md,.searchbar-cancel-button.ion-activated.sc-ion-searchbar-md{background-color:transparent}.searchbar-input.sc-ion-searchbar-md{padding-left:55px;padding-right:55px;padding-top:6px;padding-bottom:6px;background-position:left 8px center;height:auto;font-size:16px;font-weight:400;line-height:30px}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){.searchbar-input.sc-ion-searchbar-md{padding-left:unset;padding-right:unset;-webkit-padding-start:55px;padding-inline-start:55px;-webkit-padding-end:55px;padding-inline-end:55px}}[dir=rtl].sc-ion-searchbar-md .searchbar-input.sc-ion-searchbar-md,[dir=rtl].sc-ion-searchbar-md-h .searchbar-input.sc-ion-searchbar-md,[dir=rtl] .sc-ion-searchbar-md-h .searchbar-input.sc-ion-searchbar-md{background-position:right 8px center}.searchbar-clear-button.sc-ion-searchbar-md{right:13px;top:0;padding-left:0;padding-right:0;padding-top:0;padding-bottom:0;position:absolute;height:100%;border:0;background-color:transparent}[dir=rtl].sc-ion-searchbar-md .searchbar-clear-button.sc-ion-searchbar-md,[dir=rtl].sc-ion-searchbar-md-h .searchbar-clear-button.sc-ion-searchbar-md,[dir=rtl] .sc-ion-searchbar-md-h .searchbar-clear-button.sc-ion-searchbar-md{left:unset;right:unset;left:13px}.searchbar-clear-button.ion-activated.sc-ion-searchbar-md{background-color:transparent}.searchbar-clear-icon.sc-ion-searchbar-md{width:22px;height:100%}.searchbar-has-focus.sc-ion-searchbar-md-h .searchbar-search-icon.sc-ion-searchbar-md{display:block}.searchbar-has-focus.sc-ion-searchbar-md-h .searchbar-cancel-button.sc-ion-searchbar-md,.searchbar-should-show-cancel.sc-ion-searchbar-md-h .searchbar-cancel-button.sc-ion-searchbar-md{display:block}.searchbar-has-focus.sc-ion-searchbar-md-h .searchbar-cancel-button.sc-ion-searchbar-md+.searchbar-search-icon.sc-ion-searchbar-md,.searchbar-should-show-cancel.sc-ion-searchbar-md-h .searchbar-cancel-button.sc-ion-searchbar-md+.searchbar-search-icon.sc-ion-searchbar-md{display:none}ion-toolbar.sc-ion-searchbar-md-h,ion-toolbar .sc-ion-searchbar-md-h{padding-left:7px;padding-right:7px;padding-top:3px;padding-bottom:3px}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){ion-toolbar.sc-ion-searchbar-md-h,ion-toolbar .sc-ion-searchbar-md-h{padding-left:unset;padding-right:unset;-webkit-padding-start:7px;padding-inline-start:7px;-webkit-padding-end:7px;padding-inline-end:7px}}\";\n\nconst Searchbar = class {\n constructor(hostRef) {\n registerInstance(this, hostRef);\n this.ionInput = createEvent(this, \"ionInput\", 7);\n this.ionChange = createEvent(this, \"ionChange\", 7);\n this.ionCancel = createEvent(this, \"ionCancel\", 7);\n this.ionClear = createEvent(this, \"ionClear\", 7);\n this.ionBlur = createEvent(this, \"ionBlur\", 7);\n this.ionFocus = createEvent(this, \"ionFocus\", 7);\n this.ionStyle = createEvent(this, \"ionStyle\", 7);\n this.isCancelVisible = false;\n this.shouldAlignLeft = true;\n this.focused = false;\n this.noAnimate = true;\n /**\n * If `true`, enable searchbar animation.\n */\n this.animated = false;\n /**\n * Set the input's autocomplete property.\n */\n this.autocomplete = 'off';\n /**\n * Set the input's autocorrect property.\n */\n this.autocorrect = 'off';\n /**\n * Set the cancel button icon. Only applies to `md` mode.\n * Defaults to `\"arrow-back-sharp\"`.\n */\n this.cancelButtonIcon = config.get('backButtonIcon', 'arrow-back-sharp');\n /**\n * Set the the cancel button text. Only applies to `ios` mode.\n */\n this.cancelButtonText = 'Cancel';\n /**\n * Set the amount of time, in milliseconds, to wait to trigger the `ionChange` event after each keystroke.\n */\n this.debounce = 250;\n /**\n * If `true`, the user cannot interact with the input.\n */\n this.disabled = false;\n /**\n * Set the input's placeholder.\n * `placeholder` can accept either plaintext or HTML as a string.\n * To display characters normally reserved for HTML, they\n * must be escaped. For example `<Ionic>` would become\n * `<Ionic>`\n *\n * For more information: [Security Documentation](https://ionicframework.com/docs/faq/security)\n */\n this.placeholder = 'Search';\n /**\n * Sets the behavior for the cancel button. Defaults to `\"never\"`.\n * Setting to `\"focus\"` shows the cancel button on focus.\n * Setting to `\"never\"` hides the cancel button.\n * Setting to `\"always\"` shows the cancel button regardless\n * of focus state.\n */\n this.showCancelButton = 'never';\n /**\n * If `true`, enable spellcheck on the input.\n */\n this.spellcheck = false;\n /**\n * Set the type of the input.\n */\n this.type = 'search';\n /**\n * the value of the searchbar.\n */\n this.value = '';\n /**\n * Clears the input field and triggers the control change.\n */\n this.onClearInput = (ev) => {\n this.ionClear.emit();\n if (ev) {\n ev.preventDefault();\n ev.stopPropagation();\n }\n // setTimeout() fixes https://github.com/ionic-team/ionic/issues/7527\n // wait for 4 frames\n setTimeout(() => {\n const value = this.getValue();\n if (value !== '') {\n this.value = '';\n this.ionInput.emit();\n }\n }, 16 * 4);\n };\n /**\n * Clears the input field and tells the input to blur since\n * the clearInput function doesn't want the input to blur\n * then calls the custom cancel function if the user passed one in.\n */\n this.onCancelSearchbar = (ev) => {\n if (ev) {\n ev.preventDefault();\n ev.stopPropagation();\n }\n this.ionCancel.emit();\n this.onClearInput();\n if (this.nativeInput) {\n this.nativeInput.blur();\n }\n };\n /**\n * Update the Searchbar input value when the input changes\n */\n this.onInput = (ev) => {\n const input = ev.target;\n if (input) {\n this.value = input.value;\n }\n this.ionInput.emit(ev);\n };\n /**\n * Sets the Searchbar to not focused and checks if it should align left\n * based on whether there is a value in the searchbar or not.\n */\n this.onBlur = () => {\n this.focused = false;\n this.ionBlur.emit();\n this.positionElements();\n };\n /**\n * Sets the Searchbar to focused and active on input focus.\n */\n this.onFocus = () => {\n this.focused = true;\n this.ionFocus.emit();\n this.positionElements();\n };\n }\n debounceChanged() {\n this.ionChange = debounceEvent(this.ionChange, this.debounce);\n }\n valueChanged() {\n const inputEl = this.nativeInput;\n const value = this.getValue();\n if (inputEl && inputEl.value !== value) {\n inputEl.value = value;\n }\n this.ionChange.emit({ value });\n }\n showCancelButtonChanged() {\n requestAnimationFrame(() => {\n this.positionElements();\n forceUpdate(this);\n });\n }\n connectedCallback() {\n this.emitStyle();\n }\n componentDidLoad() {\n this.positionElements();\n this.debounceChanged();\n setTimeout(() => {\n this.noAnimate = false;\n }, 300);\n }\n emitStyle() {\n this.ionStyle.emit({\n 'searchbar': true\n });\n }\n /**\n * Sets focus on the specified `ion-searchbar`. Use this method instead of the global\n * `input.focus()`.\n */\n async setFocus() {\n if (this.nativeInput) {\n this.nativeInput.focus();\n }\n }\n /**\n * Returns the native `<input>` element used under the hood.\n */\n getInputElement() {\n return Promise.resolve(this.nativeInput);\n }\n /**\n * Positions the input search icon, placeholder, and the cancel button\n * based on the input value and if it is focused. (ios only)\n */\n positionElements() {\n const value = this.getValue();\n const prevAlignLeft = this.shouldAlignLeft;\n const mode = getIonMode(this);\n const shouldAlignLeft = (!this.animated || value.trim() !== '' || !!this.focused);\n this.shouldAlignLeft = shouldAlignLeft;\n if (mode !== 'ios') {\n return;\n }\n if (prevAlignLeft !== shouldAlignLeft) {\n this.positionPlaceholder();\n }\n if (this.animated) {\n this.positionCancelButton();\n }\n }\n /**\n * Positions the input placeholder\n */\n positionPlaceholder() {\n const inputEl = this.nativeInput;\n if (!inputEl) {\n return;\n }\n const isRTL = document.dir === 'rtl';\n const iconEl = (this.el.shadowRoot || this.el).querySelector('.searchbar-search-icon');\n if (this.shouldAlignLeft) {\n inputEl.removeAttribute('style');\n iconEl.removeAttribute('style');\n }\n else {\n // Create a dummy span to get the placeholder width\n const doc = document;\n const tempSpan = doc.createElement('span');\n tempSpan.innerText = this.placeholder || '';\n doc.body.appendChild(tempSpan);\n // Get the width of the span then remove it\n raf(() => {\n const textWidth = tempSpan.offsetWidth;\n tempSpan.remove();\n // Calculate the input padding\n const inputLeft = 'calc(50% - ' + (textWidth / 2) + 'px)';\n // Calculate the icon margin\n const iconLeft = 'calc(50% - ' + ((textWidth / 2) + 30) + 'px)';\n // Set the input padding start and icon margin start\n if (isRTL) {\n inputEl.style.paddingRight = inputLeft;\n iconEl.style.marginRight = iconLeft;\n }\n else {\n inputEl.style.paddingLeft = inputLeft;\n iconEl.style.marginLeft = iconLeft;\n }\n });\n }\n }\n /**\n * Show the iOS Cancel button on focus, hide it offscreen otherwise\n */\n positionCancelButton() {\n const isRTL = document.dir === 'rtl';\n const cancelButton = (this.el.shadowRoot || this.el).querySelector('.searchbar-cancel-button');\n const shouldShowCancel = this.shouldShowCancelButton();\n if (cancelButton && shouldShowCancel !== this.isCancelVisible) {\n const cancelStyle = cancelButton.style;\n this.isCancelVisible = shouldShowCancel;\n if (shouldShowCancel) {\n if (isRTL) {\n cancelStyle.marginLeft = '0';\n }\n else {\n cancelStyle.marginRight = '0';\n }\n }\n else {\n const offset = cancelButton.offsetWidth;\n if (offset > 0) {\n if (isRTL) {\n cancelStyle.marginLeft = -offset + 'px';\n }\n else {\n cancelStyle.marginRight = -offset + 'px';\n }\n }\n }\n }\n }\n getValue() {\n return this.value || '';\n }\n hasValue() {\n return this.getValue() !== '';\n }\n /**\n * Determines whether or not the cancel button should be visible onscreen.\n * Cancel button should be shown if one of two conditions applies:\n * 1. `showCancelButton` is set to `always`.\n * 2. `showCancelButton` is set to `focus`, and the searchbar has been focused.\n */\n shouldShowCancelButton() {\n if ((this.showCancelButton === 'never') || (this.showCancelButton === 'focus' && !this.focused)) {\n return false;\n }\n return true;\n }\n render() {\n const { cancelButtonText } = this;\n const animated = this.animated && config.getBoolean('animated', true);\n const mode = getIonMode(this);\n const clearIcon = this.clearIcon || (mode === 'ios' ? 'close-circle' : 'close-sharp');\n const searchIcon = this.searchIcon || (mode === 'ios' ? 'search-outline' : 'search-sharp');\n const shouldShowCancelButton = this.shouldShowCancelButton();\n const cancelButton = (this.showCancelButton !== 'never') && (h(\"button\", { \"aria-label\": cancelButtonText, \"aria-hidden\": shouldShowCancelButton ? undefined : 'true', type: \"button\", tabIndex: mode === 'ios' && !shouldShowCancelButton ? -1 : undefined, onMouseDown: this.onCancelSearchbar, onTouchStart: this.onCancelSearchbar, class: \"searchbar-cancel-button\" }, h(\"div\", { \"aria-hidden\": \"true\" }, mode === 'md'\n ? h(\"ion-icon\", { \"aria-hidden\": \"true\", mode: mode, icon: this.cancelButtonIcon, lazy: false })\n : cancelButtonText)));\n return (h(Host, { role: \"search\", \"aria-disabled\": this.disabled ? 'true' : null, class: createColorClasses(this.color, {\n [mode]: true,\n 'searchbar-animated': animated,\n 'searchbar-disabled': this.disabled,\n 'searchbar-no-animate': animated && this.noAnimate,\n 'searchbar-has-value': this.hasValue(),\n 'searchbar-left-aligned': this.shouldAlignLeft,\n 'searchbar-has-focus': this.focused,\n 'searchbar-should-show-cancel': this.shouldShowCancelButton()\n }) }, h(\"div\", { class: \"searchbar-input-container\" }, h(\"input\", { \"aria-label\": \"search text\", disabled: this.disabled, ref: el => this.nativeInput = el, class: \"searchbar-input\", inputMode: this.inputmode, enterKeyHint: this.enterkeyhint, onInput: this.onInput, onBlur: this.onBlur, onFocus: this.onFocus, placeholder: this.placeholder, type: this.type, value: this.getValue(), autoComplete: this.autocomplete, autoCorrect: this.autocorrect, spellcheck: this.spellcheck }), mode === 'md' && cancelButton, h(\"ion-icon\", { \"aria-hidden\": \"true\", mode: mode, icon: searchIcon, lazy: false, class: \"searchbar-search-icon\" }), h(\"button\", { \"aria-label\": \"reset\", type: \"button\", \"no-blur\": true, class: \"searchbar-clear-button\", onMouseDown: this.onClearInput, onTouchStart: this.onClearInput }, h(\"ion-icon\", { \"aria-hidden\": \"true\", mode: mode, icon: clearIcon, lazy: false, class: \"searchbar-clear-icon\" }))), mode === 'ios' && cancelButton));\n }\n get el() { return getElement(this); }\n static get watchers() { return {\n \"debounce\": [\"debounceChanged\"],\n \"value\": [\"valueChanged\"],\n \"showCancelButton\": [\"showCancelButtonChanged\"]\n }; }\n};\nSearchbar.style = {\n ios: searchbarIosCss,\n md: searchbarMdCss\n};\n\nexport { Searchbar as ion_searchbar };\n"]} |