ion-picker-legacy.js 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324
  1. /*!
  2. * (C) Ionic http://ionicframework.com - MIT License
  3. */
  4. import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
  5. import { r as raf } from './helpers.js';
  6. import { c as createLockController } from './lock-controller.js';
  7. import { a as printIonWarning } from './index4.js';
  8. import { d as createDelegateController, e as createTriggerController, B as BACKDROP, i as isCancel, j as prepareOverlay, k as setOverlayId, f as present, g as dismiss, h as eventMethod, s as safeCall } from './overlays.js';
  9. import { g as getClassMap } from './theme.js';
  10. import { b as getIonMode } from './ionic-global.js';
  11. import { c as createAnimation } from './animation.js';
  12. import { d as defineCustomElement$3 } from './backdrop.js';
  13. import { d as defineCustomElement$2 } from './picker-column2.js';
  14. /**
  15. * iOS Picker Enter Animation
  16. */
  17. const iosEnterAnimation = (baseEl) => {
  18. const baseAnimation = createAnimation();
  19. const backdropAnimation = createAnimation();
  20. const wrapperAnimation = createAnimation();
  21. backdropAnimation
  22. .addElement(baseEl.querySelector('ion-backdrop'))
  23. .fromTo('opacity', 0.01, 'var(--backdrop-opacity)')
  24. .beforeStyles({
  25. 'pointer-events': 'none',
  26. })
  27. .afterClearStyles(['pointer-events']);
  28. wrapperAnimation
  29. .addElement(baseEl.querySelector('.picker-wrapper'))
  30. .fromTo('transform', 'translateY(100%)', 'translateY(0%)');
  31. return baseAnimation
  32. .addElement(baseEl)
  33. .easing('cubic-bezier(.36,.66,.04,1)')
  34. .duration(400)
  35. .addAnimation([backdropAnimation, wrapperAnimation]);
  36. };
  37. /**
  38. * iOS Picker Leave Animation
  39. */
  40. const iosLeaveAnimation = (baseEl) => {
  41. const baseAnimation = createAnimation();
  42. const backdropAnimation = createAnimation();
  43. const wrapperAnimation = createAnimation();
  44. backdropAnimation
  45. .addElement(baseEl.querySelector('ion-backdrop'))
  46. .fromTo('opacity', 'var(--backdrop-opacity)', 0.01);
  47. wrapperAnimation
  48. .addElement(baseEl.querySelector('.picker-wrapper'))
  49. .fromTo('transform', 'translateY(0%)', 'translateY(100%)');
  50. return baseAnimation
  51. .addElement(baseEl)
  52. .easing('cubic-bezier(.36,.66,.04,1)')
  53. .duration(400)
  54. .addAnimation([backdropAnimation, wrapperAnimation]);
  55. };
  56. const pickerIosCss = ".sc-ion-picker-legacy-ios-h{--border-radius:0;--border-style:solid;--min-width:auto;--width:100%;--max-width:500px;--min-height:auto;--max-height:auto;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;top:0;display:block;position:absolute;width:100%;height:100%;outline:none;font-family:var(--ion-font-family, inherit);contain:strict;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;z-index:1001}.sc-ion-picker-legacy-ios-h{inset-inline-start:0}.overlay-hidden.sc-ion-picker-legacy-ios-h{display:none}.picker-wrapper.sc-ion-picker-legacy-ios{border-radius:var(--border-radius);left:0;right:0;bottom:0;-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:auto;margin-inline-end:auto;margin-top:auto;margin-bottom:auto;-webkit-transform:translate3d(0, 100%, 0);transform:translate3d(0, 100%, 0);display:-ms-flexbox;display:flex;position:absolute;-ms-flex-direction:column;flex-direction:column;width:var(--width);min-width:var(--min-width);max-width:var(--max-width);height:var(--height);min-height:var(--min-height);max-height:var(--max-height);border-width:var(--border-width);border-style:var(--border-style);border-color:var(--border-color);background:var(--background);contain:strict;overflow:hidden;z-index:10}.picker-toolbar.sc-ion-picker-legacy-ios{width:100%;background:transparent;contain:strict;z-index:1}.picker-button.sc-ion-picker-legacy-ios{border:0;font-family:inherit}.picker-button.sc-ion-picker-legacy-ios:active,.picker-button.sc-ion-picker-legacy-ios:focus{outline:none}.picker-columns.sc-ion-picker-legacy-ios{display:-ms-flexbox;display:flex;position:relative;-ms-flex-pack:center;justify-content:center;margin-bottom:var(--ion-safe-area-bottom, 0);contain:strict;overflow:hidden}.picker-above-highlight.sc-ion-picker-legacy-ios,.picker-below-highlight.sc-ion-picker-legacy-ios{display:none;pointer-events:none}.sc-ion-picker-legacy-ios-h{--background:var(--ion-background-color, #fff);--border-width:1px 0 0;--border-color:var(--ion-item-border-color, var(--ion-border-color, var(--ion-color-step-250, var(--ion-background-color-step-250, #c8c7cc))));--height:260px;--backdrop-opacity:var(--ion-backdrop-opacity, 0.26);color:var(--ion-item-color, var(--ion-text-color, #000))}.picker-toolbar.sc-ion-picker-legacy-ios{display:-ms-flexbox;display:flex;height:44px;border-bottom:0.55px solid var(--border-color)}.picker-toolbar-button.sc-ion-picker-legacy-ios{-ms-flex:1;flex:1;text-align:end}.picker-toolbar-button.sc-ion-picker-legacy-ios:last-child .picker-button.sc-ion-picker-legacy-ios{font-weight:600}.picker-toolbar-button.sc-ion-picker-legacy-ios:first-child{font-weight:normal;text-align:start}.picker-button.sc-ion-picker-legacy-ios,.picker-button.ion-activated.sc-ion-picker-legacy-ios{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;-webkit-padding-start:1em;padding-inline-start:1em;-webkit-padding-end:1em;padding-inline-end:1em;padding-top:0;padding-bottom:0;height:44px;background:transparent;color:var(--ion-color-primary, #0054e9);font-size:16px}.picker-columns.sc-ion-picker-legacy-ios{height:215px;-webkit-perspective:1000px;perspective:1000px}.picker-above-highlight.sc-ion-picker-legacy-ios{top:0;-webkit-transform:translate3d(0, 0, 90px);transform:translate3d(0, 0, 90px);display:block;position:absolute;width:100%;height:81px;border-bottom:1px solid var(--border-color);background:-webkit-gradient(linear, left top, left bottom, color-stop(20%, var(--background, var(--ion-background-color, #fff))), to(rgba(var(--background-rgb, var(--ion-background-color-rgb, 255, 255, 255)), 0.8)));background:linear-gradient(to bottom, var(--background, var(--ion-background-color, #fff)) 20%, rgba(var(--background-rgb, var(--ion-background-color-rgb, 255, 255, 255)), 0.8) 100%);z-index:10}.picker-above-highlight.sc-ion-picker-legacy-ios{inset-inline-start:0}.picker-below-highlight.sc-ion-picker-legacy-ios{top:115px;-webkit-transform:translate3d(0, 0, 90px);transform:translate3d(0, 0, 90px);display:block;position:absolute;width:100%;height:119px;border-top:1px solid var(--border-color);background:-webkit-gradient(linear, left bottom, left top, color-stop(30%, var(--background, var(--ion-background-color, #fff))), to(rgba(var(--background-rgb, var(--ion-background-color-rgb, 255, 255, 255)), 0.8)));background:linear-gradient(to top, var(--background, var(--ion-background-color, #fff)) 30%, rgba(var(--background-rgb, var(--ion-background-color-rgb, 255, 255, 255)), 0.8) 100%);z-index:11}.picker-below-highlight.sc-ion-picker-legacy-ios{inset-inline-start:0}";
  57. const IonPickerLegacyIosStyle0 = pickerIosCss;
  58. const pickerMdCss = ".sc-ion-picker-legacy-md-h{--border-radius:0;--border-style:solid;--min-width:auto;--width:100%;--max-width:500px;--min-height:auto;--max-height:auto;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;top:0;display:block;position:absolute;width:100%;height:100%;outline:none;font-family:var(--ion-font-family, inherit);contain:strict;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;z-index:1001}.sc-ion-picker-legacy-md-h{inset-inline-start:0}.overlay-hidden.sc-ion-picker-legacy-md-h{display:none}.picker-wrapper.sc-ion-picker-legacy-md{border-radius:var(--border-radius);left:0;right:0;bottom:0;-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:auto;margin-inline-end:auto;margin-top:auto;margin-bottom:auto;-webkit-transform:translate3d(0, 100%, 0);transform:translate3d(0, 100%, 0);display:-ms-flexbox;display:flex;position:absolute;-ms-flex-direction:column;flex-direction:column;width:var(--width);min-width:var(--min-width);max-width:var(--max-width);height:var(--height);min-height:var(--min-height);max-height:var(--max-height);border-width:var(--border-width);border-style:var(--border-style);border-color:var(--border-color);background:var(--background);contain:strict;overflow:hidden;z-index:10}.picker-toolbar.sc-ion-picker-legacy-md{width:100%;background:transparent;contain:strict;z-index:1}.picker-button.sc-ion-picker-legacy-md{border:0;font-family:inherit}.picker-button.sc-ion-picker-legacy-md:active,.picker-button.sc-ion-picker-legacy-md:focus{outline:none}.picker-columns.sc-ion-picker-legacy-md{display:-ms-flexbox;display:flex;position:relative;-ms-flex-pack:center;justify-content:center;margin-bottom:var(--ion-safe-area-bottom, 0);contain:strict;overflow:hidden}.picker-above-highlight.sc-ion-picker-legacy-md,.picker-below-highlight.sc-ion-picker-legacy-md{display:none;pointer-events:none}.sc-ion-picker-legacy-md-h{--background:var(--ion-background-color, #fff);--border-width:0.55px 0 0;--border-color:var(--ion-item-border-color, var(--ion-border-color, var(--ion-color-step-150, var(--ion-background-color-step-150, rgba(0, 0, 0, 0.13)))));--height:260px;--backdrop-opacity:var(--ion-backdrop-opacity, 0.26);color:var(--ion-item-color, var(--ion-text-color, #000))}.picker-toolbar.sc-ion-picker-legacy-md{display:-ms-flexbox;display:flex;-ms-flex-pack:end;justify-content:flex-end;height:44px}.picker-button.sc-ion-picker-legacy-md,.picker-button.ion-activated.sc-ion-picker-legacy-md{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;-webkit-padding-start:1.1em;padding-inline-start:1.1em;-webkit-padding-end:1.1em;padding-inline-end:1.1em;padding-top:0;padding-bottom:0;height:44px;background:transparent;color:var(--ion-color-primary, #0054e9);font-size:14px;font-weight:500;text-transform:uppercase;-webkit-box-shadow:none;box-shadow:none}.picker-columns.sc-ion-picker-legacy-md{height:216px;-webkit-perspective:1800px;perspective:1800px}.picker-above-highlight.sc-ion-picker-legacy-md{top:0;-webkit-transform:translate3d(0, 0, 90px);transform:translate3d(0, 0, 90px);position:absolute;width:100%;height:81px;border-bottom:1px solid var(--ion-item-border-color, var(--ion-border-color, var(--ion-color-step-150, var(--ion-background-color-step-150, rgba(0, 0, 0, 0.13)))));background:-webkit-gradient(linear, left top, left bottom, color-stop(20%, var(--ion-background-color, #fff)), to(rgba(var(--ion-background-color-rgb, 255, 255, 255), 0.8)));background:linear-gradient(to bottom, var(--ion-background-color, #fff) 20%, rgba(var(--ion-background-color-rgb, 255, 255, 255), 0.8) 100%);z-index:10}.picker-above-highlight.sc-ion-picker-legacy-md{inset-inline-start:0}.picker-below-highlight.sc-ion-picker-legacy-md{top:115px;-webkit-transform:translate3d(0, 0, 90px);transform:translate3d(0, 0, 90px);position:absolute;width:100%;height:119px;border-top:1px solid var(--ion-item-border-color, var(--ion-border-color, var(--ion-color-step-150, var(--ion-background-color-step-150, rgba(0, 0, 0, 0.13)))));background:-webkit-gradient(linear, left bottom, left top, color-stop(30%, var(--ion-background-color, #fff)), to(rgba(var(--ion-background-color-rgb, 255, 255, 255), 0.8)));background:linear-gradient(to top, var(--ion-background-color, #fff) 30%, rgba(var(--ion-background-color-rgb, 255, 255, 255), 0.8) 100%);z-index:11}.picker-below-highlight.sc-ion-picker-legacy-md{inset-inline-start:0}";
  59. const IonPickerLegacyMdStyle0 = pickerMdCss;
  60. const Picker = /*@__PURE__*/ proxyCustomElement(class Picker extends HTMLElement {
  61. constructor() {
  62. super();
  63. this.__registerHost();
  64. this.didPresent = createEvent(this, "ionPickerDidPresent", 7);
  65. this.willPresent = createEvent(this, "ionPickerWillPresent", 7);
  66. this.willDismiss = createEvent(this, "ionPickerWillDismiss", 7);
  67. this.didDismiss = createEvent(this, "ionPickerDidDismiss", 7);
  68. this.didPresentShorthand = createEvent(this, "didPresent", 7);
  69. this.willPresentShorthand = createEvent(this, "willPresent", 7);
  70. this.willDismissShorthand = createEvent(this, "willDismiss", 7);
  71. this.didDismissShorthand = createEvent(this, "didDismiss", 7);
  72. this.delegateController = createDelegateController(this);
  73. this.lockController = createLockController();
  74. this.triggerController = createTriggerController();
  75. this.onBackdropTap = () => {
  76. this.dismiss(undefined, BACKDROP);
  77. };
  78. this.dispatchCancelHandler = (ev) => {
  79. const role = ev.detail.role;
  80. if (isCancel(role)) {
  81. const cancelButton = this.buttons.find((b) => b.role === 'cancel');
  82. this.callButtonHandler(cancelButton);
  83. }
  84. };
  85. this.presented = false;
  86. this.overlayIndex = undefined;
  87. this.delegate = undefined;
  88. this.hasController = false;
  89. this.keyboardClose = true;
  90. this.enterAnimation = undefined;
  91. this.leaveAnimation = undefined;
  92. this.buttons = [];
  93. this.columns = [];
  94. this.cssClass = undefined;
  95. this.duration = 0;
  96. this.showBackdrop = true;
  97. this.backdropDismiss = true;
  98. this.animated = true;
  99. this.htmlAttributes = undefined;
  100. this.isOpen = false;
  101. this.trigger = undefined;
  102. }
  103. onIsOpenChange(newValue, oldValue) {
  104. if (newValue === true && oldValue === false) {
  105. this.present();
  106. }
  107. else if (newValue === false && oldValue === true) {
  108. this.dismiss();
  109. }
  110. }
  111. triggerChanged() {
  112. const { trigger, el, triggerController } = this;
  113. if (trigger) {
  114. triggerController.addClickListener(el, trigger);
  115. }
  116. }
  117. connectedCallback() {
  118. prepareOverlay(this.el);
  119. this.triggerChanged();
  120. }
  121. disconnectedCallback() {
  122. this.triggerController.removeClickListener();
  123. }
  124. componentWillLoad() {
  125. var _a;
  126. if (!((_a = this.htmlAttributes) === null || _a === void 0 ? void 0 : _a.id)) {
  127. setOverlayId(this.el);
  128. }
  129. }
  130. componentDidLoad() {
  131. printIonWarning('[ion-picker-legacy] - ion-picker-legacy and ion-picker-legacy-column have been deprecated in favor of new versions of the ion-picker and ion-picker-column components. These new components display inline with your page content allowing for more presentation flexibility than before.', this.el);
  132. /**
  133. * If picker was rendered with isOpen="true"
  134. * then we should open picker immediately.
  135. */
  136. if (this.isOpen === true) {
  137. raf(() => this.present());
  138. }
  139. /**
  140. * When binding values in frameworks such as Angular
  141. * it is possible for the value to be set after the Web Component
  142. * initializes but before the value watcher is set up in Stencil.
  143. * As a result, the watcher callback may not be fired.
  144. * We work around this by manually calling the watcher
  145. * callback when the component has loaded and the watcher
  146. * is configured.
  147. */
  148. this.triggerChanged();
  149. }
  150. /**
  151. * Present the picker overlay after it has been created.
  152. */
  153. async present() {
  154. const unlock = await this.lockController.lock();
  155. await this.delegateController.attachViewToDom();
  156. await present(this, 'pickerEnter', iosEnterAnimation, iosEnterAnimation, undefined);
  157. if (this.duration > 0) {
  158. this.durationTimeout = setTimeout(() => this.dismiss(), this.duration);
  159. }
  160. unlock();
  161. }
  162. /**
  163. * Dismiss the picker overlay after it has been presented.
  164. *
  165. * @param data Any data to emit in the dismiss events.
  166. * @param role The role of the element that is dismissing the picker.
  167. * This can be useful in a button handler for determining which button was
  168. * clicked to dismiss the picker.
  169. * Some examples include: ``"cancel"`, `"destructive"`, "selected"`, and `"backdrop"`.
  170. */
  171. async dismiss(data, role) {
  172. const unlock = await this.lockController.lock();
  173. if (this.durationTimeout) {
  174. clearTimeout(this.durationTimeout);
  175. }
  176. const dismissed = await dismiss(this, data, role, 'pickerLeave', iosLeaveAnimation, iosLeaveAnimation);
  177. if (dismissed) {
  178. this.delegateController.removeViewFromDom();
  179. }
  180. unlock();
  181. return dismissed;
  182. }
  183. /**
  184. * Returns a promise that resolves when the picker did dismiss.
  185. */
  186. onDidDismiss() {
  187. return eventMethod(this.el, 'ionPickerDidDismiss');
  188. }
  189. /**
  190. * Returns a promise that resolves when the picker will dismiss.
  191. */
  192. onWillDismiss() {
  193. return eventMethod(this.el, 'ionPickerWillDismiss');
  194. }
  195. /**
  196. * Get the column that matches the specified name.
  197. *
  198. * @param name The name of the column.
  199. */
  200. getColumn(name) {
  201. return Promise.resolve(this.columns.find((column) => column.name === name));
  202. }
  203. async buttonClick(button) {
  204. const role = button.role;
  205. if (isCancel(role)) {
  206. return this.dismiss(undefined, role);
  207. }
  208. const shouldDismiss = await this.callButtonHandler(button);
  209. if (shouldDismiss) {
  210. return this.dismiss(this.getSelected(), button.role);
  211. }
  212. return Promise.resolve();
  213. }
  214. async callButtonHandler(button) {
  215. if (button) {
  216. // a handler has been provided, execute it
  217. // pass the handler the values from the inputs
  218. const rtn = await safeCall(button.handler, this.getSelected());
  219. if (rtn === false) {
  220. // if the return value of the handler is false then do not dismiss
  221. return false;
  222. }
  223. }
  224. return true;
  225. }
  226. getSelected() {
  227. const selected = {};
  228. this.columns.forEach((col, index) => {
  229. const selectedColumn = col.selectedIndex !== undefined ? col.options[col.selectedIndex] : undefined;
  230. selected[col.name] = {
  231. text: selectedColumn ? selectedColumn.text : undefined,
  232. value: selectedColumn ? selectedColumn.value : undefined,
  233. columnIndex: index,
  234. };
  235. });
  236. return selected;
  237. }
  238. render() {
  239. const { htmlAttributes } = this;
  240. const mode = getIonMode(this);
  241. return (h(Host, Object.assign({ key: 'b6b6ca6f9aa74681e6d67f64b366f5965fec2a6d', "aria-modal": "true", tabindex: "-1" }, htmlAttributes, { style: {
  242. zIndex: `${20000 + this.overlayIndex}`,
  243. }, class: Object.assign({ [mode]: true,
  244. // Used internally for styling
  245. [`picker-${mode}`]: true, 'overlay-hidden': true }, getClassMap(this.cssClass)), onIonBackdropTap: this.onBackdropTap, onIonPickerWillDismiss: this.dispatchCancelHandler }), h("ion-backdrop", { key: '20202ca1d7b6cd5f517a802879b39efb79033cb1', visible: this.showBackdrop, tappable: this.backdropDismiss }), h("div", { key: '72fe76a1e1748593cdf38deab5100087bfa75983', tabindex: "0", "aria-hidden": "true" }), h("div", { key: '921954cfc716f3774aab66677563754ff479a44a', class: "picker-wrapper ion-overlay-wrapper", role: "dialog" }, h("div", { key: '224413950bfcf2a948e58c2554c2a37a4e6d0319', class: "picker-toolbar" }, this.buttons.map((b) => (h("div", { class: buttonWrapperClass(b) }, h("button", { type: "button", onClick: () => this.buttonClick(b), class: buttonClass(b) }, b.text))))), h("div", { key: '7e688c2d0705940ec8a9ace493b679e6a9b68860', class: "picker-columns" }, h("div", { key: '0ec2db79a9ca9e2a0b324b6c4b90176a0eb33df3', class: "picker-above-highlight" }), this.presented && this.columns.map((c) => h("ion-picker-legacy-column", { col: c })), h("div", { key: 'b8344f4f342fddc3f773435515567ef8f3accbb0', class: "picker-below-highlight" }))), h("div", { key: '374c7a6b31b0a00ab3913faeea0ec3d6c02274b9', tabindex: "0", "aria-hidden": "true" })));
  246. }
  247. get el() { return this; }
  248. static get watchers() { return {
  249. "isOpen": ["onIsOpenChange"],
  250. "trigger": ["triggerChanged"]
  251. }; }
  252. static get style() { return {
  253. ios: IonPickerLegacyIosStyle0,
  254. md: IonPickerLegacyMdStyle0
  255. }; }
  256. }, [34, "ion-picker-legacy", {
  257. "overlayIndex": [2, "overlay-index"],
  258. "delegate": [16],
  259. "hasController": [4, "has-controller"],
  260. "keyboardClose": [4, "keyboard-close"],
  261. "enterAnimation": [16],
  262. "leaveAnimation": [16],
  263. "buttons": [16],
  264. "columns": [16],
  265. "cssClass": [1, "css-class"],
  266. "duration": [2],
  267. "showBackdrop": [4, "show-backdrop"],
  268. "backdropDismiss": [4, "backdrop-dismiss"],
  269. "animated": [4],
  270. "htmlAttributes": [16],
  271. "isOpen": [4, "is-open"],
  272. "trigger": [1],
  273. "presented": [32],
  274. "present": [64],
  275. "dismiss": [64],
  276. "onDidDismiss": [64],
  277. "onWillDismiss": [64],
  278. "getColumn": [64]
  279. }, undefined, {
  280. "isOpen": ["onIsOpenChange"],
  281. "trigger": ["triggerChanged"]
  282. }]);
  283. const buttonWrapperClass = (button) => {
  284. return {
  285. [`picker-toolbar-${button.role}`]: button.role !== undefined,
  286. 'picker-toolbar-button': true,
  287. };
  288. };
  289. const buttonClass = (button) => {
  290. return Object.assign({ 'picker-button': true, 'ion-activatable': true }, getClassMap(button.cssClass));
  291. };
  292. function defineCustomElement$1() {
  293. if (typeof customElements === "undefined") {
  294. return;
  295. }
  296. const components = ["ion-picker-legacy", "ion-backdrop", "ion-picker-legacy-column"];
  297. components.forEach(tagName => { switch (tagName) {
  298. case "ion-picker-legacy":
  299. if (!customElements.get(tagName)) {
  300. customElements.define(tagName, Picker);
  301. }
  302. break;
  303. case "ion-backdrop":
  304. if (!customElements.get(tagName)) {
  305. defineCustomElement$3();
  306. }
  307. break;
  308. case "ion-picker-legacy-column":
  309. if (!customElements.get(tagName)) {
  310. defineCustomElement$2();
  311. }
  312. break;
  313. } });
  314. }
  315. const IonPickerLegacy = Picker;
  316. const defineCustomElement = defineCustomElement$1;
  317. export { IonPickerLegacy, defineCustomElement };