@sparkle-learning/core 0.0.35 → 0.0.38
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{header-mobile-collapse_2.cjs.entry.js → header-mobile-collapse.cjs.entry.js} +0 -22
- package/dist/cjs/ion-avatar.cjs.entry.js +25 -0
- package/dist/cjs/ion-button.cjs.entry.js +129 -0
- package/dist/cjs/ion-card-title.cjs.entry.js +30 -0
- package/dist/cjs/ion-card_2.cjs.entry.js +91 -0
- package/dist/cjs/ion-icon_13.cjs.entry.js +1505 -0
- package/dist/cjs/ion-input_2.cjs.entry.js +313 -0
- package/dist/cjs/ion-label_2.cjs.entry.js +126 -0
- package/dist/cjs/ion-spinner.cjs.entry.js +64 -0
- package/dist/cjs/ion-textarea.cjs.entry.js +248 -0
- package/dist/cjs/ion-toggle.cjs.entry.js +177 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/sparkle-core.cjs.js +1 -1
- package/dist/cjs/sparkle-feed-post.cjs.entry.js +120 -0
- package/dist/cjs/{sparkle-quiz.cjs.entry.js → sparkle-quiz-v1.cjs.entry.js} +4 -4
- package/dist/collection/collection-manifest.json +2 -1
- package/dist/collection/components/sparkle-feed-post/sparkle-feed-post.js +30 -28
- package/dist/collection/components/sparkle-quiz/{sparkle-quiz.css → sparkle-quiz/sparkle-quiz.css} +0 -0
- package/dist/collection/components/sparkle-quiz/sparkle-quiz/sparkle-quiz.js +327 -0
- package/dist/collection/components/sparkle-quiz/sparkle-quiz-v1.css +48 -0
- package/dist/collection/components/sparkle-quiz/{sparkle-quiz.js → sparkle-quiz-v1.js} +4 -4
- package/dist/esm/{PrivateRoute-530ef873.js → PrivateRoute-7b526801.js} +2 -2
- package/dist/esm/{active-router-9843e205.js → active-router-fc9e4e06.js} +1 -1
- package/dist/esm/{animation-d98d3e81.js → animation-e0716b39.js} +1 -1
- package/dist/esm/{app-globals-08edc964.js → app-globals-3f0347b0.js} +1 -1
- package/dist/esm/{auth.service-79389d86.js → auth.service-9fb86455.js} +3 -3
- package/dist/esm/{auth.store-b812b34b.js → auth.store-633e8414.js} +1 -1
- package/dist/esm/compass-svg.entry.js +1 -1
- package/dist/esm/context-consumer.entry.js +1 -1
- package/dist/esm/course-select.entry.js +1 -1
- package/dist/esm/{dom-utils-8e73e88b.js → dom-utils-109a7d75.js} +1 -1
- package/dist/esm/{facilitator.service-7babc526.js → facilitator.service-8fd435bf.js} +2 -2
- package/dist/esm/{feed.service-80fbe79d.js → feed.service-ace049e5.js} +2 -2
- package/dist/esm/{framework-delegate-9b329182.js → framework-delegate-e4f8013b.js} +1 -1
- package/dist/esm/{haptic-3a76a65c.js → haptic-522f76f2.js} +1 -1
- package/dist/esm/{header-mobile-collapse_2.entry.js → header-mobile-collapse.entry.js} +3 -24
- package/dist/esm/{helpers-94a5855b.js → helpers-03073fe4.js} +1 -1
- package/dist/esm/{httpService-b2b7a1ad.js → httpService-61864992.js} +2 -2
- package/dist/esm/{icons-16f1a80b.js → icons-90b957ab.js} +1 -1
- package/dist/esm/{index-c23a1826.js → index-37004831.js} +2 -2
- package/dist/esm/{index-4ec6b9c2.js → index-4044fde9.js} +1 -1
- package/dist/esm/{index-230a26c9.js → index-a2d2941d.js} +1 -1
- package/dist/esm/{index-478745be.js → index-b4b4e503.js} +4 -4
- package/dist/esm/{index-9db08224.js → index-c04b9ed5.js} +1 -1
- package/dist/esm/{index-95307148.js → index-dedabca0.js} +3 -3
- package/dist/esm/{index-ab1c6a9f.js → index-f9b9ba5d.js} +2 -2
- package/dist/esm/{index.es-1c3b1ef3.js → index.es-283fbd2e.js} +2 -2
- package/dist/esm/index.js +8 -8
- package/dist/esm/{injectHistory-4bfff188.js → injectHistory-968f626d.js} +1 -1
- package/dist/esm/{input-shims-ce5c01df.js → input-shims-cc3720a0.js} +2 -2
- package/dist/esm/ion-accordion-group.entry.js +2 -2
- package/dist/esm/ion-accordion.entry.js +4 -4
- package/dist/esm/ion-action-sheet_4.entry.js +8 -8
- package/dist/esm/ion-app.entry.js +5 -5
- package/dist/esm/ion-avatar.entry.js +21 -0
- package/dist/esm/ion-back-button.entry.js +4 -4
- package/dist/esm/ion-backdrop.entry.js +2 -2
- package/dist/esm/ion-badge.entry.js +2 -2
- package/dist/esm/ion-breadcrumb.entry.js +4 -4
- package/dist/esm/ion-breadcrumbs.entry.js +2 -2
- package/dist/esm/ion-button.entry.js +125 -0
- package/dist/esm/ion-buttons_3.entry.js +2 -2
- package/dist/esm/ion-card-header.entry.js +2 -2
- package/dist/esm/ion-card-subtitle.entry.js +2 -2
- package/dist/esm/ion-card-title.entry.js +26 -0
- package/dist/esm/ion-card_2.entry.js +86 -0
- package/dist/esm/ion-checkbox_4.entry.js +3 -3
- package/dist/esm/ion-chip.entry.js +2 -2
- package/dist/esm/ion-col_3.entry.js +2 -2
- package/dist/esm/ion-content_2.entry.js +4 -4
- package/dist/esm/ion-datetime-button.entry.js +3 -3
- package/dist/esm/ion-datetime.entry.js +4 -4
- package/dist/esm/ion-fab-button.entry.js +4 -4
- package/dist/esm/ion-fab-list.entry.js +2 -2
- package/dist/esm/ion-fab.entry.js +2 -2
- package/dist/esm/ion-footer.entry.js +4 -4
- package/dist/esm/ion-icon_13.entry.js +1489 -0
- package/dist/esm/ion-img.entry.js +3 -3
- package/dist/esm/ion-infinite-scroll-content.entry.js +2 -2
- package/dist/esm/ion-infinite-scroll.entry.js +4 -4
- package/dist/esm/ion-input_2.entry.js +308 -0
- package/dist/esm/ion-item-divider.entry.js +2 -2
- package/dist/esm/ion-item-group.entry.js +2 -2
- package/dist/esm/ion-item-option.entry.js +2 -2
- package/dist/esm/ion-item-options.entry.js +3 -3
- package/dist/esm/ion-item-sliding.entry.js +4 -4
- package/dist/esm/ion-label_2.entry.js +121 -0
- package/dist/esm/ion-loading.entry.js +5 -5
- package/dist/esm/ion-menu-button.entry.js +7 -7
- package/dist/esm/ion-menu-toggle.entry.js +6 -6
- package/dist/esm/ion-menu.entry.js +6 -6
- package/dist/esm/ion-modal.entry.js +8 -8
- package/dist/esm/ion-nav-link.entry.js +1 -1
- package/dist/esm/ion-nav.entry.js +6 -6
- package/dist/esm/ion-picker-column-internal_2.entry.js +4 -4
- package/dist/esm/ion-picker-column.entry.js +4 -4
- package/dist/esm/ion-picker.entry.js +5 -5
- package/dist/esm/ion-progress-bar.entry.js +3 -3
- package/dist/esm/ion-refresher-content.entry.js +3 -3
- package/dist/esm/ion-refresher.entry.js +6 -6
- package/dist/esm/ion-reorder-group.entry.js +5 -5
- package/dist/esm/ion-reorder.entry.js +3 -3
- package/dist/esm/ion-route-redirect.entry.js +1 -1
- package/dist/esm/ion-route.entry.js +1 -1
- package/dist/esm/ion-router-link.entry.js +2 -2
- package/dist/esm/ion-router-outlet.entry.js +6 -6
- package/dist/esm/ion-router.entry.js +2 -2
- package/dist/esm/ion-searchbar.entry.js +4 -4
- package/dist/esm/ion-segment-button.entry.js +3 -3
- package/dist/esm/ion-segment.entry.js +3 -3
- package/dist/esm/ion-select_2.entry.js +4 -4
- package/dist/esm/ion-skeleton-text.entry.js +2 -2
- package/dist/esm/ion-slide.entry.js +2 -2
- package/dist/esm/ion-slides.entry.js +3 -3
- package/dist/esm/ion-spinner.entry.js +60 -0
- package/dist/esm/ion-split-pane.entry.js +2 -2
- package/dist/esm/ion-tab-bar.entry.js +2 -2
- package/dist/esm/ion-tab-button.entry.js +2 -2
- package/dist/esm/ion-tab.entry.js +3 -3
- package/dist/esm/ion-tabs.entry.js +1 -1
- package/dist/esm/ion-textarea.entry.js +244 -0
- package/dist/esm/ion-thumbnail.entry.js +2 -2
- package/dist/esm/ion-toast.entry.js +5 -5
- package/dist/esm/ion-toggle.entry.js +173 -0
- package/dist/esm/ion-virtual-scroll.entry.js +2 -2
- package/dist/esm/{ionic-global-293e882b.js → ionic-global-4903e23e.js} +1 -1
- package/dist/esm/{ios.transition-7cd34deb.js → ios.transition-3a6179bb.js} +4 -4
- package/dist/esm/loader.js +4 -4
- package/dist/esm/{md.transition-2589a5b1.js → md.transition-cff16bf3.js} +4 -4
- package/dist/esm/{menu-toggle-util-f92ba2f0.js → menu-toggle-util-59241733.js} +1 -1
- package/dist/esm/{overlays-dfa730c8.js → overlays-bdd9344a.js} +2 -2
- package/dist/esm/{purify-79af871f.js → purify-7085b248.js} +1 -1
- package/dist/esm/sparkle-animation-player.entry.js +1 -1
- package/dist/esm/sparkle-card_3.entry.js +2 -2
- package/dist/esm/sparkle-character-intro.entry.js +1 -1
- package/dist/esm/sparkle-code.entry.js +2 -2
- package/dist/esm/sparkle-compass-post.entry.js +1 -1
- package/dist/esm/sparkle-compass.entry.js +1 -1
- package/dist/esm/sparkle-core.js +4 -4
- package/dist/esm/sparkle-course-root.entry.js +11 -11
- package/dist/esm/sparkle-dropdown.entry.js +2 -2
- package/dist/esm/sparkle-emoji.entry.js +1 -1
- package/dist/esm/sparkle-export-lessons_6.entry.js +11 -11
- package/dist/esm/sparkle-facilitator-header_19.entry.js +17 -17
- package/dist/esm/sparkle-facilitator-notes-form.entry.js +7 -7
- package/dist/esm/sparkle-feed-post.entry.js +116 -0
- package/dist/esm/sparkle-feedback.entry.js +8 -8
- package/dist/esm/sparkle-goal-form.entry.js +7 -7
- package/dist/esm/sparkle-goal-progress.entry.js +1 -1
- package/dist/esm/sparkle-gww-comment-list.entry.js +1 -1
- package/dist/esm/sparkle-gww-graph.entry.js +1 -1
- package/dist/esm/sparkle-gww-item.entry.js +4 -4
- package/dist/esm/sparkle-intro.entry.js +1 -1
- package/dist/esm/sparkle-lower-content-nav.entry.js +1 -1
- package/dist/esm/sparkle-menu-collapsible.entry.js +2 -2
- package/dist/esm/sparkle-menu-toggle_3.entry.js +3 -3
- package/dist/esm/sparkle-modal-image.entry.js +1 -1
- package/dist/esm/sparkle-notfound-page.entry.js +1 -1
- package/dist/esm/sparkle-overlay.entry.js +1 -1
- package/dist/esm/sparkle-poll.entry.js +1 -1
- package/dist/esm/sparkle-quiz-container.entry.js +1 -1
- package/dist/esm/{sparkle-quiz.entry.js → sparkle-quiz-v1.entry.js} +5 -5
- package/dist/esm/sparkle-select.entry.js +1 -1
- package/dist/esm/sparkle-sidebar.entry.js +1 -1
- package/dist/esm/sparkle-tab.entry.js +1 -1
- package/dist/esm/sparkle-table-of-contents.entry.js +1 -1
- package/dist/esm/sparkle-tabs.entry.js +1 -1
- package/dist/esm/sparkle-validation-error.entry.js +1 -1
- package/dist/esm/sparkle-youtube.entry.js +1 -1
- package/dist/esm/{status-tap-79b6199d.js → status-tap-463d0f87.js} +3 -3
- package/dist/esm/stencil-async-content.entry.js +1 -1
- package/dist/esm/stencil-route-title.entry.js +2 -2
- package/dist/esm/stencil-router-prompt.entry.js +2 -2
- package/dist/esm/stencil-router-redirect.entry.js +2 -2
- package/dist/esm/{student.service-0caed0f4.js → student.service-e6eb1f99.js} +2 -2
- package/dist/esm/{swipe-back-ad7a0361.js → swipe-back-f8765ac9.js} +1 -1
- package/dist/esm/{user.store-8477642a.js → user.store-b8645067.js} +1 -1
- package/dist/sparkle-core/index.esm.js +1 -1
- package/dist/sparkle-core/p-0147266a.js +1 -0
- package/dist/sparkle-core/{p-4c9e010d.entry.js → p-014b5707.entry.js} +1 -1
- package/dist/sparkle-core/p-03585916.js +1 -0
- package/dist/sparkle-core/{p-9ef14088.entry.js → p-04c7b276.entry.js} +1 -1
- package/dist/sparkle-core/{p-4af496a8.entry.js → p-06642405.entry.js} +1 -1
- package/dist/sparkle-core/{p-0b92326d.entry.js → p-06c7d0f2.entry.js} +1 -1
- package/dist/sparkle-core/p-08d97c59.entry.js +1 -0
- package/dist/sparkle-core/p-0bb0cf41.entry.js +1 -0
- package/dist/sparkle-core/{p-136b93d5.entry.js → p-0c0f8acd.entry.js} +1 -1
- package/dist/sparkle-core/p-0ea2518d.entry.js +1 -0
- package/dist/sparkle-core/{p-fe3a7bca.js → p-1019ebc3.js} +1 -1
- package/dist/sparkle-core/p-162bff1a.entry.js +1 -0
- package/dist/sparkle-core/{p-27075abe.js → p-17eb4633.js} +1 -1
- package/dist/sparkle-core/p-1b1ba156.entry.js +1 -0
- package/dist/sparkle-core/{p-b00d0a47.entry.js → p-1e4782af.entry.js} +1 -1
- package/dist/sparkle-core/{p-c8ad5a5b.entry.js → p-1f0b3ff9.entry.js} +2 -2
- package/dist/sparkle-core/{p-3ef53ebf.entry.js → p-214d1229.entry.js} +1 -1
- package/dist/sparkle-core/p-25e556cc.entry.js +1 -0
- package/dist/sparkle-core/{p-bae8cd7d.entry.js → p-27fbabc3.entry.js} +1 -1
- package/dist/sparkle-core/{p-e6d39f6e.entry.js → p-285ab4ed.entry.js} +1 -1
- package/dist/sparkle-core/{p-d220a642.entry.js → p-2ba70507.entry.js} +1 -1
- package/dist/sparkle-core/{p-5a3de051.entry.js → p-2d4a5ddf.entry.js} +2 -2
- package/dist/sparkle-core/p-2d9659e2.entry.js +1 -0
- package/dist/sparkle-core/p-2e035338.entry.js +1 -0
- package/dist/sparkle-core/{p-c9f474d0.js → p-2e2b813c.js} +1 -1
- package/dist/sparkle-core/{p-df5efe0d.entry.js → p-2f10208d.entry.js} +1 -1
- package/dist/sparkle-core/p-2fba9a3a.entry.js +1 -0
- package/dist/sparkle-core/p-317037de.entry.js +1 -0
- package/dist/sparkle-core/p-32762a44.entry.js +1 -0
- package/dist/sparkle-core/p-32f4e565.entry.js +1 -0
- package/dist/sparkle-core/{p-23d713e2.js → p-340754ed.js} +1 -1
- package/dist/sparkle-core/{p-7b21bd70.entry.js → p-352677e6.entry.js} +1 -1
- package/dist/sparkle-core/p-370609ba.entry.js +1 -0
- package/dist/sparkle-core/{p-fea20ec2.entry.js → p-38b7cf68.entry.js} +1 -1
- package/dist/sparkle-core/{p-c5eb4404.entry.js → p-3963e02b.entry.js} +1 -1
- package/dist/sparkle-core/p-3bc68dd0.js +1 -0
- package/dist/sparkle-core/p-3c133235.entry.js +1 -0
- package/dist/sparkle-core/{p-308517b3.js → p-3f85e1ca.js} +2 -2
- package/dist/sparkle-core/p-4053ecdb.entry.js +1 -0
- package/dist/sparkle-core/{p-1394cbb8.js → p-405f7c58.js} +2 -2
- package/dist/sparkle-core/{p-d6a3a639.entry.js → p-4320dac0.entry.js} +1 -1
- package/dist/sparkle-core/p-44f813b7.entry.js +1 -0
- package/dist/sparkle-core/p-46869031.entry.js +1 -0
- package/dist/sparkle-core/{p-17aef6f9.js → p-4a5f2b2b.js} +1 -1
- package/dist/sparkle-core/p-4ae75caa.entry.js +1 -0
- package/dist/sparkle-core/{p-a05871e6.js → p-4c6a7e52.js} +1 -1
- package/dist/sparkle-core/{p-d6637b48.entry.js → p-5096739e.entry.js} +1 -1
- package/dist/sparkle-core/p-5322c920.entry.js +1 -0
- package/dist/sparkle-core/p-539bf742.js +4 -0
- package/dist/sparkle-core/{p-2bd4c60e.js → p-53bcbd1d.js} +1 -1
- package/dist/sparkle-core/{p-11ed6b7f.entry.js → p-54ada5e3.entry.js} +1 -1
- package/dist/sparkle-core/{p-5979f253.entry.js → p-5519d283.entry.js} +1 -1
- package/dist/sparkle-core/p-554da5b8.entry.js +1 -0
- package/dist/sparkle-core/{p-8d630960.js → p-56a2e8a2.js} +1 -1
- package/dist/sparkle-core/{p-d0d0e5e5.entry.js → p-5893bbe5.entry.js} +1 -1
- package/dist/sparkle-core/{p-b8ba8164.entry.js → p-594a6982.entry.js} +1 -1
- package/dist/sparkle-core/{p-34ebfc8a.entry.js → p-5c435d5a.entry.js} +1 -1
- package/dist/sparkle-core/p-5da2d95a.entry.js +1 -0
- package/dist/sparkle-core/{p-1c2aee9c.js → p-5fc26938.js} +1 -1
- package/dist/sparkle-core/{p-16b7974e.entry.js → p-601397df.entry.js} +1 -1
- package/dist/sparkle-core/{p-dff8325e.js → p-604a7987.js} +1 -1
- package/dist/sparkle-core/{p-58f74119.entry.js → p-616941c6.entry.js} +1 -1
- package/dist/sparkle-core/{p-fe214d79.entry.js → p-6316d124.entry.js} +1 -1
- package/dist/sparkle-core/p-63f69cdc.entry.js +1 -0
- package/dist/sparkle-core/p-63f71ada.entry.js +1 -0
- package/dist/sparkle-core/p-64e814b9.entry.js +1 -0
- package/dist/sparkle-core/{p-0c603495.entry.js → p-66a85393.entry.js} +1 -1
- package/dist/sparkle-core/{p-ea4a9f0d.entry.js → p-69487d90.entry.js} +1 -1
- package/dist/sparkle-core/p-6b05a1d3.entry.js +1 -0
- package/dist/sparkle-core/{p-9dc42d70.entry.js → p-6c894fa2.entry.js} +1 -1
- package/dist/sparkle-core/p-6ea246fe.js +4 -0
- package/dist/sparkle-core/p-6ed0236e.entry.js +1 -0
- package/dist/sparkle-core/{p-34d93a39.entry.js → p-6f0545b3.entry.js} +1 -1
- package/dist/sparkle-core/{p-8cbe019a.entry.js → p-727e1c28.entry.js} +1 -1
- package/dist/sparkle-core/p-81714d94.entry.js +1 -0
- package/dist/sparkle-core/{p-3d2c0e24.entry.js → p-82ad4e7c.entry.js} +2 -2
- package/dist/sparkle-core/p-859563db.entry.js +1 -0
- package/dist/sparkle-core/p-865f36a8.entry.js +1 -0
- package/dist/sparkle-core/{p-01743e3e.js → p-871106e0.js} +1 -1
- package/dist/sparkle-core/p-8a41b502.entry.js +1 -0
- package/dist/sparkle-core/p-8c74cbb6.entry.js +1 -0
- package/dist/sparkle-core/p-91accfc1.js +1 -0
- package/dist/sparkle-core/p-93e74f1b.entry.js +1 -0
- package/dist/sparkle-core/{p-6ae9c743.entry.js → p-975b99ee.entry.js} +1 -1
- package/dist/sparkle-core/p-99ee9919.js +1 -0
- package/dist/sparkle-core/{p-3fd92216.entry.js → p-9e309b3e.entry.js} +1 -1
- package/dist/sparkle-core/p-9e7fee8f.entry.js +1 -0
- package/dist/sparkle-core/{p-280e938d.js → p-a019ad0c.js} +1 -1
- package/dist/sparkle-core/{p-06af1bc8.entry.js → p-a2638250.entry.js} +1 -1
- package/dist/sparkle-core/{p-e1743d82.entry.js → p-a2ebcf0a.entry.js} +1 -1
- package/dist/sparkle-core/p-a5c5da9a.entry.js +1 -0
- package/dist/sparkle-core/{p-966817ec.js → p-a85598ad.js} +1 -1
- package/dist/sparkle-core/p-a8a77bec.entry.js +1 -0
- package/dist/sparkle-core/{p-ba775d8e.entry.js → p-a98d7ebe.entry.js} +1 -1
- package/dist/sparkle-core/{p-ed3dfd89.js → p-ad102371.js} +2 -2
- package/dist/sparkle-core/{p-bd2c8e30.entry.js → p-b236d258.entry.js} +2 -2
- package/dist/sparkle-core/{p-0127a61a.entry.js → p-b4b01fa2.entry.js} +1 -1
- package/dist/sparkle-core/{p-9a383065.entry.js → p-b4bc8b02.entry.js} +2 -2
- package/dist/sparkle-core/{p-767c9db8.entry.js → p-b5ec8fb0.entry.js} +1 -1
- package/dist/sparkle-core/{p-0798d46a.entry.js → p-b83444c7.entry.js} +1 -1
- package/dist/sparkle-core/{p-fde96f7c.js → p-b9933822.js} +1 -1
- package/dist/sparkle-core/p-b9b1d4da.entry.js +1 -0
- package/dist/sparkle-core/{p-3810777d.js → p-be28346b.js} +1 -1
- package/dist/sparkle-core/{p-3c752205.entry.js → p-c278db5f.entry.js} +1 -1
- package/dist/sparkle-core/p-c2990b24.entry.js +1 -0
- package/dist/sparkle-core/{p-a6c1a55a.entry.js → p-c2bbaf55.entry.js} +1 -1
- package/dist/sparkle-core/{p-16c81890.entry.js → p-c4af184b.entry.js} +1 -1
- package/dist/sparkle-core/p-c71cbbf7.entry.js +1 -0
- package/dist/sparkle-core/p-c8c73fa7.js +4 -0
- package/dist/sparkle-core/p-c8fe45df.entry.js +1 -0
- package/dist/sparkle-core/{p-7b3d1457.js → p-c9cd4ff1.js} +1 -1
- package/dist/sparkle-core/{p-a19b42f0.js → p-ca4c8a10.js} +1 -1
- package/dist/sparkle-core/p-cab3da3c.entry.js +1 -0
- package/dist/sparkle-core/p-cc518c36.entry.js +1 -0
- package/dist/sparkle-core/p-cd832fbf.entry.js +1 -0
- package/dist/sparkle-core/{p-085eb951.entry.js → p-ce94efdb.entry.js} +1 -1
- package/dist/sparkle-core/p-cffd4817.entry.js +1 -0
- package/dist/sparkle-core/{p-e09de7ac.js → p-d0ac5f17.js} +1 -1
- package/dist/sparkle-core/{p-9cd95e7e.entry.js → p-d0adf726.entry.js} +1 -1
- package/dist/sparkle-core/p-d1fcbfc2.js +4 -0
- package/dist/sparkle-core/p-d20e4fcf.entry.js +1 -0
- package/dist/sparkle-core/p-d24e53ab.entry.js +1 -0
- package/dist/sparkle-core/p-d288e6c1.entry.js +1 -0
- package/dist/sparkle-core/p-d432d3ac.entry.js +1 -0
- package/dist/sparkle-core/{p-785f1879.entry.js → p-d601810e.entry.js} +1 -1
- package/dist/sparkle-core/{p-ea7d7a3b.js → p-d81a0680.js} +1 -1
- package/dist/sparkle-core/{p-58389020.entry.js → p-d969f7d0.entry.js} +3 -3
- package/dist/sparkle-core/p-dabc80c4.entry.js +1 -0
- package/dist/sparkle-core/{p-351b82a8.entry.js → p-db8387eb.entry.js} +1 -1
- package/dist/sparkle-core/{p-4e0502b8.entry.js → p-dca90a55.entry.js} +1 -1
- package/dist/sparkle-core/{p-506f3c5f.js → p-dd2e7f84.js} +2 -2
- package/dist/sparkle-core/p-e0429a19.entry.js +1 -0
- package/dist/sparkle-core/{p-d5b8302f.entry.js → p-e249aebf.entry.js} +1 -1
- package/dist/sparkle-core/p-e3e36ce9.entry.js +1 -0
- package/dist/sparkle-core/{p-fdb9a613.entry.js → p-e421d638.entry.js} +1 -1
- package/dist/sparkle-core/p-e65c72cc.entry.js +1 -0
- package/dist/sparkle-core/{p-b2827978.entry.js → p-e7066c64.entry.js} +1 -1
- package/dist/sparkle-core/{p-4338e1e3.js → p-e7568d4b.js} +1 -1
- package/dist/sparkle-core/{p-efe37368.entry.js → p-e8988989.entry.js} +1 -1
- package/dist/sparkle-core/{p-6a337ad1.entry.js → p-ea962e1b.entry.js} +1 -1
- package/dist/sparkle-core/p-eb40a191.entry.js +1 -0
- package/dist/sparkle-core/{p-bb575dba.entry.js → p-ecdea569.entry.js} +1 -1
- package/dist/sparkle-core/p-ed9f48c4.entry.js +1 -0
- package/dist/sparkle-core/{p-6a5ace01.js → p-ee1e0eb4.js} +1 -1
- package/dist/sparkle-core/{p-a111c567.entry.js → p-ef6c2352.entry.js} +1 -1
- package/dist/sparkle-core/p-f0cf4a8f.entry.js +1 -0
- package/dist/sparkle-core/{p-defeaa5c.entry.js → p-f4b0b6a4.entry.js} +1 -1
- package/dist/sparkle-core/{p-1701723e.entry.js → p-fc965b88.entry.js} +1 -1
- package/dist/sparkle-core/p-fd8d0738.entry.js +4 -0
- package/dist/sparkle-core/{p-63d8a5b7.entry.js → p-fda95b6e.entry.js} +1 -1
- package/dist/sparkle-core/{p-9b4979b5.entry.js → p-fde382f0.entry.js} +1 -1
- package/dist/sparkle-core/{p-3eb56165.entry.js → p-fe6dc976.entry.js} +1 -1
- package/dist/sparkle-core/{p-f63a13d8.entry.js → p-ff0e0d4e.entry.js} +1 -1
- package/dist/sparkle-core/sparkle-core.esm.js +1 -1
- package/dist/types/components/sparkle-quiz/sparkle-quiz/sparkle-quiz.d.ts +42 -0
- package/dist/types/components/sparkle-quiz/sparkle-quiz-v1.d.ts +41 -0
- package/dist/types/components/sparkle-quiz/sparkle-quiz.d.ts +36 -36
- package/dist/types/components.d.ts +37 -1
- package/package.json +1 -1
- package/dist/cjs/ion-avatar_16.cjs.entry.js +0 -1907
- package/dist/cjs/ion-range.cjs.entry.js +0 -515
- package/dist/cjs/ion-text.cjs.entry.js +0 -24
- package/dist/cjs/sparkle-quiz-feedback_5.cjs.entry.js +0 -117
- package/dist/cjs/stencil-route-link.cjs.entry.js +0 -77
- package/dist/esm/ion-avatar_16.entry.js +0 -1888
- package/dist/esm/ion-range.entry.js +0 -511
- package/dist/esm/ion-text.entry.js +0 -20
- package/dist/esm/sparkle-quiz-feedback_5.entry.js +0 -109
- package/dist/esm/stencil-route-link.entry.js +0 -73
- package/dist/sparkle-core/p-0d7cceaa.entry.js +0 -1
- package/dist/sparkle-core/p-0d813026.entry.js +0 -1
- package/dist/sparkle-core/p-122427b7.entry.js +0 -1
- package/dist/sparkle-core/p-12c4f45c.entry.js +0 -1
- package/dist/sparkle-core/p-14340143.entry.js +0 -4
- package/dist/sparkle-core/p-14a06a91.entry.js +0 -1
- package/dist/sparkle-core/p-180857a2.entry.js +0 -1
- package/dist/sparkle-core/p-1acc7870.entry.js +0 -1
- package/dist/sparkle-core/p-1cd4c3cc.entry.js +0 -1
- package/dist/sparkle-core/p-21d9833d.js +0 -1
- package/dist/sparkle-core/p-25c13612.entry.js +0 -1
- package/dist/sparkle-core/p-2699868a.entry.js +0 -1
- package/dist/sparkle-core/p-2c89a6c2.entry.js +0 -1
- package/dist/sparkle-core/p-3227afcb.entry.js +0 -1
- package/dist/sparkle-core/p-363a2d6d.js +0 -4
- package/dist/sparkle-core/p-36c48760.entry.js +0 -1
- package/dist/sparkle-core/p-384911d7.entry.js +0 -1
- package/dist/sparkle-core/p-3b618eda.entry.js +0 -1
- package/dist/sparkle-core/p-442eadcf.entry.js +0 -1
- package/dist/sparkle-core/p-4d0dfbc9.js +0 -1
- package/dist/sparkle-core/p-524a6174.entry.js +0 -1
- package/dist/sparkle-core/p-53aac9d7.entry.js +0 -1
- package/dist/sparkle-core/p-56700a40.entry.js +0 -1
- package/dist/sparkle-core/p-5722be24.entry.js +0 -1
- package/dist/sparkle-core/p-5a850731.entry.js +0 -1
- package/dist/sparkle-core/p-5dcf33fb.entry.js +0 -1
- package/dist/sparkle-core/p-5e8fa1ac.entry.js +0 -1
- package/dist/sparkle-core/p-5ef50959.js +0 -1
- package/dist/sparkle-core/p-615b8f64.entry.js +0 -1
- package/dist/sparkle-core/p-76206f80.entry.js +0 -1
- package/dist/sparkle-core/p-76a6e202.entry.js +0 -1
- package/dist/sparkle-core/p-788735b9.entry.js +0 -1
- package/dist/sparkle-core/p-8e42e634.entry.js +0 -1
- package/dist/sparkle-core/p-8e56f9ee.entry.js +0 -1
- package/dist/sparkle-core/p-8ed0cefb.entry.js +0 -1
- package/dist/sparkle-core/p-9484e34b.entry.js +0 -1
- package/dist/sparkle-core/p-969e98e5.entry.js +0 -1
- package/dist/sparkle-core/p-98f3925b.js +0 -4
- package/dist/sparkle-core/p-99231c00.js +0 -4
- package/dist/sparkle-core/p-9eea81f2.js +0 -1
- package/dist/sparkle-core/p-a2f7c751.entry.js +0 -1
- package/dist/sparkle-core/p-a458b415.entry.js +0 -1
- package/dist/sparkle-core/p-ab3a8f5e.entry.js +0 -1
- package/dist/sparkle-core/p-ac0e4d8c.entry.js +0 -1
- package/dist/sparkle-core/p-bb3e3482.entry.js +0 -1
- package/dist/sparkle-core/p-c48352cf.js +0 -4
- package/dist/sparkle-core/p-ca0edc9b.entry.js +0 -1
- package/dist/sparkle-core/p-cb04b18a.entry.js +0 -1
- package/dist/sparkle-core/p-d38a2511.entry.js +0 -1
- package/dist/sparkle-core/p-d5ba8e80.entry.js +0 -1
- package/dist/sparkle-core/p-d6788642.entry.js +0 -1
- package/dist/sparkle-core/p-d86f8633.entry.js +0 -1
- package/dist/sparkle-core/p-df5cfa7f.entry.js +0 -1
- package/dist/sparkle-core/p-e28a106d.entry.js +0 -1
- package/dist/sparkle-core/p-e566c0b3.entry.js +0 -1
- package/dist/sparkle-core/p-f187d129.entry.js +0 -1
- package/dist/sparkle-core/p-f5e7bfa5.js +0 -1
- package/dist/sparkle-core/p-ff26d891.entry.js +0 -1
@@ -0,0 +1,248 @@
|
|
1
|
+
'use strict';
|
2
|
+
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
4
|
+
|
5
|
+
const index = require('./index-51e8292e.js');
|
6
|
+
const ionicGlobal = require('./ionic-global-2cde9d3a.js');
|
7
|
+
const helpers = require('./helpers-c2496722.js');
|
8
|
+
const theme = require('./theme-b0b295c1.js');
|
9
|
+
|
10
|
+
const textareaIosCss = ".sc-ion-textarea-ios-h{--background:initial;--color:initial;--placeholder-color:initial;--placeholder-font-style:initial;--placeholder-font-weight:initial;--placeholder-opacity:0.5;--padding-top:0;--padding-end:0;--padding-bottom:0;--padding-start:0;--border-radius:0;display:block;position:relative;flex:1;width:100%;background:var(--background);color:var(--color);font-family:var(--ion-font-family, inherit);white-space:pre-wrap;z-index:2;box-sizing:border-box}.ion-color.sc-ion-textarea-ios-h{background:initial}.ion-color.sc-ion-textarea-ios-h{color:var(--ion-color-base)}ion-item.sc-ion-textarea-ios-h,ion-item .sc-ion-textarea-ios-h{align-self:baseline}ion-item.sc-ion-textarea-ios-h:not(.item-label),ion-item:not(.item-label) .sc-ion-textarea-ios-h{--padding-start:0}.textarea-wrapper.sc-ion-textarea-ios{display:grid;min-width:inherit;max-width:inherit;min-height:inherit;max-height:inherit}.textarea-wrapper.sc-ion-textarea-ios::after{white-space:pre-wrap;content:attr(data-replicated-value) \" \";visibility:hidden}.native-textarea.sc-ion-textarea-ios,.textarea-wrapper.sc-ion-textarea-ios::after{padding-left:var(--padding-start);padding-right:var(--padding-end);padding-top:var(--padding-top);padding-bottom:var(--padding-bottom);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;grid-area:1/1/2/2}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){.native-textarea.sc-ion-textarea-ios,.textarea-wrapper.sc-ion-textarea-ios::after{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)}}.native-textarea.sc-ion-textarea-ios{border-radius:var(--border-radius);margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;display:block;width:100%;max-width:100%;max-height:100%;border:0;outline:none;background:transparent;box-sizing:border-box;resize:none;appearance:none;overflow:hidden}.native-textarea.sc-ion-textarea-ios::placeholder{padding-left:0;padding-right:0;padding-top:0;padding-bottom:0;color:var(--placeholder-color);font-family:inherit;font-style:var(--placeholder-font-style);font-weight:var(--placeholder-font-weight);opacity:var(--placeholder-opacity)}.native-textarea[disabled].sc-ion-textarea-ios{opacity:0.4}.cloned-input.sc-ion-textarea-ios{left:0;top:0;position:absolute;pointer-events:none}[dir=rtl].sc-ion-textarea-ios .cloned-input.sc-ion-textarea-ios,[dir=rtl].sc-ion-textarea-ios-h .cloned-input.sc-ion-textarea-ios,[dir=rtl] .sc-ion-textarea-ios-h .cloned-input.sc-ion-textarea-ios{left:unset;right:unset;right:0}[auto-grow].sc-ion-textarea-ios-h .cloned-input.sc-ion-textarea-ios{height:100%}.item-label-floating.item-has-placeholder.sc-ion-textarea-ios-h:not(.item-has-value),.item-label-floating.item-has-placeholder:not(.item-has-value) .sc-ion-textarea-ios-h{opacity:0}.item-label-floating.item-has-placeholder.sc-ion-textarea-ios-h:not(.item-has-value).item-has-focus,.item-label-floating.item-has-placeholder:not(.item-has-value).item-has-focus .sc-ion-textarea-ios-h{transition:opacity 0.15s cubic-bezier(0.4, 0, 0.2, 1);opacity:1}.sc-ion-textarea-ios-h{--padding-top:10px;--padding-end:10px;--padding-bottom:10px;--padding-start:0;font-size:inherit}.item-label-stacked.sc-ion-textarea-ios-h,.item-label-stacked .sc-ion-textarea-ios-h,.item-label-floating.sc-ion-textarea-ios-h,.item-label-floating .sc-ion-textarea-ios-h{--padding-top:8px;--padding-bottom:8px;--padding-start:0px}";
|
11
|
+
|
12
|
+
const textareaMdCss = ".sc-ion-textarea-md-h{--background:initial;--color:initial;--placeholder-color:initial;--placeholder-font-style:initial;--placeholder-font-weight:initial;--placeholder-opacity:0.5;--padding-top:0;--padding-end:0;--padding-bottom:0;--padding-start:0;--border-radius:0;display:block;position:relative;flex:1;width:100%;background:var(--background);color:var(--color);font-family:var(--ion-font-family, inherit);white-space:pre-wrap;z-index:2;box-sizing:border-box}.ion-color.sc-ion-textarea-md-h{background:initial}.ion-color.sc-ion-textarea-md-h{color:var(--ion-color-base)}ion-item.sc-ion-textarea-md-h,ion-item .sc-ion-textarea-md-h{align-self:baseline}ion-item.sc-ion-textarea-md-h:not(.item-label),ion-item:not(.item-label) .sc-ion-textarea-md-h{--padding-start:0}.textarea-wrapper.sc-ion-textarea-md{display:grid;min-width:inherit;max-width:inherit;min-height:inherit;max-height:inherit}.textarea-wrapper.sc-ion-textarea-md::after{white-space:pre-wrap;content:attr(data-replicated-value) \" \";visibility:hidden}.native-textarea.sc-ion-textarea-md,.textarea-wrapper.sc-ion-textarea-md::after{padding-left:var(--padding-start);padding-right:var(--padding-end);padding-top:var(--padding-top);padding-bottom:var(--padding-bottom);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;grid-area:1/1/2/2}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){.native-textarea.sc-ion-textarea-md,.textarea-wrapper.sc-ion-textarea-md::after{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)}}.native-textarea.sc-ion-textarea-md{border-radius:var(--border-radius);margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;display:block;width:100%;max-width:100%;max-height:100%;border:0;outline:none;background:transparent;box-sizing:border-box;resize:none;appearance:none;overflow:hidden}.native-textarea.sc-ion-textarea-md::placeholder{padding-left:0;padding-right:0;padding-top:0;padding-bottom:0;color:var(--placeholder-color);font-family:inherit;font-style:var(--placeholder-font-style);font-weight:var(--placeholder-font-weight);opacity:var(--placeholder-opacity)}.native-textarea[disabled].sc-ion-textarea-md{opacity:0.4}.cloned-input.sc-ion-textarea-md{left:0;top:0;position:absolute;pointer-events:none}[dir=rtl].sc-ion-textarea-md .cloned-input.sc-ion-textarea-md,[dir=rtl].sc-ion-textarea-md-h .cloned-input.sc-ion-textarea-md,[dir=rtl] .sc-ion-textarea-md-h .cloned-input.sc-ion-textarea-md{left:unset;right:unset;right:0}[auto-grow].sc-ion-textarea-md-h .cloned-input.sc-ion-textarea-md{height:100%}.item-label-floating.item-has-placeholder.sc-ion-textarea-md-h:not(.item-has-value),.item-label-floating.item-has-placeholder:not(.item-has-value) .sc-ion-textarea-md-h{opacity:0}.item-label-floating.item-has-placeholder.sc-ion-textarea-md-h:not(.item-has-value).item-has-focus,.item-label-floating.item-has-placeholder:not(.item-has-value).item-has-focus .sc-ion-textarea-md-h{transition:opacity 0.15s cubic-bezier(0.4, 0, 0.2, 1);opacity:1}.sc-ion-textarea-md-h{--padding-top:10px;--padding-end:0;--padding-bottom:11px;--padding-start:8px;margin-left:0;margin-right:0;margin-top:8px;margin-bottom:0;font-size:inherit}.item-label-stacked.sc-ion-textarea-md-h,.item-label-stacked .sc-ion-textarea-md-h,.item-label-floating.sc-ion-textarea-md-h,.item-label-floating .sc-ion-textarea-md-h{--padding-top:8px;--padding-bottom:8px;--padding-start:0}";
|
13
|
+
|
14
|
+
const Textarea = class {
|
15
|
+
constructor(hostRef) {
|
16
|
+
index.registerInstance(this, hostRef);
|
17
|
+
this.ionChange = index.createEvent(this, "ionChange", 7);
|
18
|
+
this.ionInput = index.createEvent(this, "ionInput", 7);
|
19
|
+
this.ionStyle = index.createEvent(this, "ionStyle", 7);
|
20
|
+
this.ionBlur = index.createEvent(this, "ionBlur", 7);
|
21
|
+
this.ionFocus = index.createEvent(this, "ionFocus", 7);
|
22
|
+
this.inputId = `ion-textarea-${textareaIds++}`;
|
23
|
+
this.didBlurAfterEdit = false;
|
24
|
+
this.inheritedAttributes = {};
|
25
|
+
/**
|
26
|
+
* This is required for a WebKit bug which requires us to
|
27
|
+
* blur and focus an input to properly focus the input in
|
28
|
+
* an item with delegatesFocus. It will no longer be needed
|
29
|
+
* with iOS 14.
|
30
|
+
*
|
31
|
+
* @internal
|
32
|
+
*/
|
33
|
+
this.fireFocusEvents = true;
|
34
|
+
this.hasFocus = false;
|
35
|
+
/**
|
36
|
+
* Indicates whether and how the text value should be automatically capitalized as it is entered/edited by the user.
|
37
|
+
* Available options: `"off"`, `"none"`, `"on"`, `"sentences"`, `"words"`, `"characters"`.
|
38
|
+
*/
|
39
|
+
this.autocapitalize = 'none';
|
40
|
+
/**
|
41
|
+
* This Boolean attribute lets you specify that a form control should have input focus when the page loads.
|
42
|
+
*/
|
43
|
+
this.autofocus = false;
|
44
|
+
/**
|
45
|
+
* If `true`, the value will be cleared after focus upon edit. Defaults to `true` when `type` is `"password"`, `false` for all other types.
|
46
|
+
*/
|
47
|
+
this.clearOnEdit = false;
|
48
|
+
/**
|
49
|
+
* Set the amount of time, in milliseconds, to wait to trigger the `ionChange` event after each keystroke. This also impacts form bindings such as `ngModel` or `v-model`.
|
50
|
+
*/
|
51
|
+
this.debounce = 0;
|
52
|
+
/**
|
53
|
+
* If `true`, the user cannot interact with the textarea.
|
54
|
+
*/
|
55
|
+
this.disabled = false;
|
56
|
+
/**
|
57
|
+
* The name of the control, which is submitted with the form data.
|
58
|
+
*/
|
59
|
+
this.name = this.inputId;
|
60
|
+
/**
|
61
|
+
* If `true`, the user cannot modify the value.
|
62
|
+
*/
|
63
|
+
this.readonly = false;
|
64
|
+
/**
|
65
|
+
* If `true`, the user must fill in a value before submitting a form.
|
66
|
+
*/
|
67
|
+
this.required = false;
|
68
|
+
/**
|
69
|
+
* If `true`, the element will have its spelling and grammar checked.
|
70
|
+
*/
|
71
|
+
this.spellcheck = false;
|
72
|
+
/**
|
73
|
+
* If `true`, the textarea container will grow and shrink based
|
74
|
+
* on the contents of the textarea.
|
75
|
+
*/
|
76
|
+
this.autoGrow = false;
|
77
|
+
/**
|
78
|
+
* The value of the textarea.
|
79
|
+
*/
|
80
|
+
this.value = '';
|
81
|
+
this.onInput = (ev) => {
|
82
|
+
if (this.nativeInput) {
|
83
|
+
this.value = this.nativeInput.value;
|
84
|
+
}
|
85
|
+
this.emitStyle();
|
86
|
+
this.ionInput.emit(ev);
|
87
|
+
};
|
88
|
+
this.onFocus = (ev) => {
|
89
|
+
this.hasFocus = true;
|
90
|
+
this.focusChange();
|
91
|
+
if (this.fireFocusEvents) {
|
92
|
+
this.ionFocus.emit(ev);
|
93
|
+
}
|
94
|
+
};
|
95
|
+
this.onBlur = (ev) => {
|
96
|
+
this.hasFocus = false;
|
97
|
+
this.focusChange();
|
98
|
+
if (this.fireFocusEvents) {
|
99
|
+
this.ionBlur.emit(ev);
|
100
|
+
}
|
101
|
+
};
|
102
|
+
this.onKeyDown = () => {
|
103
|
+
this.checkClearOnEdit();
|
104
|
+
};
|
105
|
+
}
|
106
|
+
debounceChanged() {
|
107
|
+
this.ionChange = helpers.debounceEvent(this.ionChange, this.debounce);
|
108
|
+
}
|
109
|
+
disabledChanged() {
|
110
|
+
this.emitStyle();
|
111
|
+
}
|
112
|
+
/**
|
113
|
+
* Update the native input element when the value changes
|
114
|
+
*/
|
115
|
+
valueChanged() {
|
116
|
+
const nativeInput = this.nativeInput;
|
117
|
+
const value = this.getValue();
|
118
|
+
if (nativeInput && nativeInput.value !== value) {
|
119
|
+
nativeInput.value = value;
|
120
|
+
}
|
121
|
+
this.runAutoGrow();
|
122
|
+
this.emitStyle();
|
123
|
+
this.ionChange.emit({ value });
|
124
|
+
}
|
125
|
+
connectedCallback() {
|
126
|
+
this.emitStyle();
|
127
|
+
this.debounceChanged();
|
128
|
+
{
|
129
|
+
document.dispatchEvent(new CustomEvent('ionInputDidLoad', {
|
130
|
+
detail: this.el,
|
131
|
+
}));
|
132
|
+
}
|
133
|
+
}
|
134
|
+
disconnectedCallback() {
|
135
|
+
{
|
136
|
+
document.dispatchEvent(new CustomEvent('ionInputDidUnload', {
|
137
|
+
detail: this.el,
|
138
|
+
}));
|
139
|
+
}
|
140
|
+
}
|
141
|
+
componentWillLoad() {
|
142
|
+
this.inheritedAttributes = Object.assign(Object.assign({}, helpers.inheritAriaAttributes(this.el)), helpers.inheritAttributes(this.el, ['title']));
|
143
|
+
}
|
144
|
+
componentDidLoad() {
|
145
|
+
this.runAutoGrow();
|
146
|
+
}
|
147
|
+
/**
|
148
|
+
* Sets focus on the native `textarea` in `ion-textarea`. Use this method instead of the global
|
149
|
+
* `textarea.focus()`.
|
150
|
+
*/
|
151
|
+
async setFocus() {
|
152
|
+
if (this.nativeInput) {
|
153
|
+
this.nativeInput.focus();
|
154
|
+
}
|
155
|
+
}
|
156
|
+
/**
|
157
|
+
* Sets blur on the native `textarea` in `ion-textarea`. Use this method instead of the global
|
158
|
+
* `textarea.blur()`.
|
159
|
+
* @internal
|
160
|
+
*/
|
161
|
+
async setBlur() {
|
162
|
+
if (this.nativeInput) {
|
163
|
+
this.nativeInput.blur();
|
164
|
+
}
|
165
|
+
}
|
166
|
+
/**
|
167
|
+
* Returns the native `<textarea>` element used under the hood.
|
168
|
+
*/
|
169
|
+
getInputElement() {
|
170
|
+
return Promise.resolve(this.nativeInput);
|
171
|
+
}
|
172
|
+
emitStyle() {
|
173
|
+
this.ionStyle.emit({
|
174
|
+
interactive: true,
|
175
|
+
textarea: true,
|
176
|
+
input: true,
|
177
|
+
'interactive-disabled': this.disabled,
|
178
|
+
'has-placeholder': this.placeholder !== undefined,
|
179
|
+
'has-value': this.hasValue(),
|
180
|
+
'has-focus': this.hasFocus,
|
181
|
+
});
|
182
|
+
}
|
183
|
+
runAutoGrow() {
|
184
|
+
if (this.nativeInput && this.autoGrow) {
|
185
|
+
index.writeTask(() => {
|
186
|
+
var _a;
|
187
|
+
if (this.textareaWrapper) {
|
188
|
+
// Replicated value is an attribute to be used in the stylesheet
|
189
|
+
// to set the inner contents of a pseudo element.
|
190
|
+
this.textareaWrapper.dataset.replicatedValue = (_a = this.value) !== null && _a !== void 0 ? _a : '';
|
191
|
+
}
|
192
|
+
});
|
193
|
+
}
|
194
|
+
}
|
195
|
+
/**
|
196
|
+
* Check if we need to clear the text input if clearOnEdit is enabled
|
197
|
+
*/
|
198
|
+
checkClearOnEdit() {
|
199
|
+
if (!this.clearOnEdit) {
|
200
|
+
return;
|
201
|
+
}
|
202
|
+
// Did the input value change after it was blurred and edited?
|
203
|
+
if (this.didBlurAfterEdit && this.hasValue()) {
|
204
|
+
// Clear the input
|
205
|
+
this.value = '';
|
206
|
+
}
|
207
|
+
// Reset the flag
|
208
|
+
this.didBlurAfterEdit = false;
|
209
|
+
}
|
210
|
+
focusChange() {
|
211
|
+
// If clearOnEdit is enabled and the input blurred but has a value, set a flag
|
212
|
+
if (this.clearOnEdit && !this.hasFocus && this.hasValue()) {
|
213
|
+
this.didBlurAfterEdit = true;
|
214
|
+
}
|
215
|
+
this.emitStyle();
|
216
|
+
}
|
217
|
+
hasValue() {
|
218
|
+
return this.getValue() !== '';
|
219
|
+
}
|
220
|
+
getValue() {
|
221
|
+
return this.value || '';
|
222
|
+
}
|
223
|
+
render() {
|
224
|
+
const mode = ionicGlobal.getIonMode(this);
|
225
|
+
const value = this.getValue();
|
226
|
+
const labelId = this.inputId + '-lbl';
|
227
|
+
const label = helpers.findItemLabel(this.el);
|
228
|
+
if (label) {
|
229
|
+
label.id = labelId;
|
230
|
+
}
|
231
|
+
return (index.h(index.Host, { "aria-disabled": this.disabled ? 'true' : null, class: theme.createColorClasses(this.color, {
|
232
|
+
[mode]: true,
|
233
|
+
}) }, index.h("div", { class: "textarea-wrapper", ref: (el) => (this.textareaWrapper = el) }, index.h("textarea", Object.assign({ class: "native-textarea", "aria-labelledby": label ? labelId : null, ref: (el) => (this.nativeInput = el), autoCapitalize: this.autocapitalize, autoFocus: this.autofocus, enterKeyHint: this.enterkeyhint, inputMode: this.inputmode, disabled: this.disabled, maxLength: this.maxlength, minLength: this.minlength, name: this.name, placeholder: this.placeholder || '', readOnly: this.readonly, required: this.required, spellcheck: this.spellcheck, cols: this.cols, rows: this.rows, wrap: this.wrap, onInput: this.onInput, onBlur: this.onBlur, onFocus: this.onFocus, onKeyDown: this.onKeyDown }, this.inheritedAttributes), value))));
|
234
|
+
}
|
235
|
+
get el() { return index.getElement(this); }
|
236
|
+
static get watchers() { return {
|
237
|
+
"debounce": ["debounceChanged"],
|
238
|
+
"disabled": ["disabledChanged"],
|
239
|
+
"value": ["valueChanged"]
|
240
|
+
}; }
|
241
|
+
};
|
242
|
+
let textareaIds = 0;
|
243
|
+
Textarea.style = {
|
244
|
+
ios: textareaIosCss,
|
245
|
+
md: textareaMdCss
|
246
|
+
};
|
247
|
+
|
248
|
+
exports.ion_textarea = Textarea;
|
@@ -0,0 +1,177 @@
|
|
1
|
+
'use strict';
|
2
|
+
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
4
|
+
|
5
|
+
const index = require('./index-51e8292e.js');
|
6
|
+
const index$1 = require('./index-975586fd.js');
|
7
|
+
const ionicGlobal = require('./ionic-global-2cde9d3a.js');
|
8
|
+
const helpers = require('./helpers-c2496722.js');
|
9
|
+
const haptic = require('./haptic-780f33c4.js');
|
10
|
+
const dir = require('./dir-5af5259a.js');
|
11
|
+
const theme = require('./theme-b0b295c1.js');
|
12
|
+
|
13
|
+
const toggleIosCss = ":host{box-sizing:content-box !important;display:inline-block;position:relative;outline:none;contain:content;cursor:pointer;touch-action:none;user-select:none;z-index:2}:host(.ion-focused) input{border:2px solid #5e9ed6}:host(.toggle-disabled){pointer-events:none}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;appearance:none;outline:none;display:flex;align-items:center;opacity:0;pointer-events:none}[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}.toggle-icon-wrapper{display:flex;position:relative;align-items:center;width:100%;height:100%;transition:var(--handle-transition);will-change:transform}.toggle-icon{border-radius:var(--border-radius);display:block;position:relative;width:100%;height:100%;background:var(--background);pointer-events:none;overflow:inherit}:host(.toggle-checked) .toggle-icon{background:var(--background-checked)}.toggle-inner{left:var(--handle-spacing);border-radius:var(--handle-border-radius);position:absolute;width:var(--handle-width);height:var(--handle-height);max-height:var(--handle-max-height);transition:var(--handle-transition);background:var(--handle-background);box-shadow:var(--handle-box-shadow);contain:strict}[dir=rtl] .toggle-inner,:host-context([dir=rtl]) .toggle-inner{left:unset;right:unset;right:var(--handle-spacing)}:host(.toggle-checked) .toggle-icon-wrapper{transform:translate3d(calc(100% - var(--handle-width)), 0, 0)}:host-context([dir=rtl]):host(.toggle-checked) .toggle-icon-wrapper,:host-context([dir=rtl]).toggle-checked .toggle-icon-wrapper{transform:translate3d(calc(-100% + var(--handle-width)), 0, 0)}:host(.toggle-checked) .toggle-inner{transform:translate3d(calc(var(--handle-spacing) * -2), 0, 0);background:var(--handle-background-checked)}:host-context([dir=rtl]):host(.toggle-checked) .toggle-inner,:host-context([dir=rtl]).toggle-checked .toggle-inner{transform:translate3d(calc(var(--handle-spacing) * 2), 0, 0)}:host{--background:rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.088);--background-checked:var(--ion-color-primary, #3880ff);--border-radius:16px;--handle-background:#ffffff;--handle-background-checked:#ffffff;--handle-border-radius:25.5px;--handle-box-shadow:0 3px 12px rgba(0, 0, 0, 0.16), 0 3px 1px rgba(0, 0, 0, 0.1);--handle-height:calc(32px - (2px * 2));--handle-max-height:calc(100% - var(--handle-spacing) * 2);--handle-width:calc(32px - (2px * 2));--handle-spacing:2px;--handle-transition:transform 300ms, width 120ms ease-in-out 80ms, left 110ms ease-in-out 80ms, right 110ms ease-in-out 80ms;width:51px;height:32px;contain:strict;overflow:hidden}:host(.ion-color.toggle-checked) .toggle-icon{background:var(--ion-color-base)}:host(.toggle-activated) .toggle-switch-icon{opacity:0}.toggle-icon{transform:translate3d(0, 0, 0);transition:background-color 300ms}.toggle-inner{will-change:transform}.toggle-switch-icon{position:absolute;top:50%;width:11px;height:11px;transform:translateY(-50%);transition:opacity 300ms, color 300ms}.toggle-switch-icon{right:6px;position:absolute;color:var(--ion-color-dark)}[dir=rtl] .toggle-switch-icon,:host-context([dir=rtl]) .toggle-switch-icon{right:initial;left:6px;}:host(.toggle-checked) .toggle-switch-icon.toggle-switch-icon-checked{color:var(--ion-color-contrast, #fff)}:host(.toggle-checked) .toggle-switch-icon:not(.toggle-switch-icon-checked){opacity:0}.toggle-switch-icon-checked{right:initial;left:4px;position:absolute;width:15px;height:15px;transform:translateY(-50%) rotate(90deg)}[dir=rtl] .toggle-switch-icon-checked,:host-context([dir=rtl]) .toggle-switch-icon-checked{right:4px}:host(.toggle-activated) .toggle-icon::before,:host(.toggle-checked) .toggle-icon::before{transform:scale3d(0, 0, 0)}:host(.toggle-activated.toggle-checked) .toggle-inner::before{transform:scale3d(0, 0, 0)}:host(.toggle-activated) .toggle-inner{width:calc(var(--handle-width) + 6px)}:host(.toggle-activated.toggle-checked) .toggle-icon-wrapper{transform:translate3d(calc(100% - var(--handle-width) - 6px), 0, 0)}:host-context([dir=rtl]):host(.toggle-activated.toggle-checked) .toggle-icon-wrapper,:host-context([dir=rtl]).toggle-activated.toggle-checked .toggle-icon-wrapper{transform:translate3d(calc(-100% + var(--handle-width) + 6px), 0, 0)}:host(.toggle-disabled){opacity:0.3}:host(.in-item[slot]){margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;padding-left:20px;padding-right:10px;padding-top:6px;padding-bottom:5px}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){:host(.in-item[slot]){padding-left:unset;padding-right:unset;-webkit-padding-start:20px;padding-inline-start:20px;-webkit-padding-end:10px;padding-inline-end:10px}}:host(.in-item[slot=start]){padding-left:0;padding-right:16px;padding-top:6px;padding-bottom:5px}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){:host(.in-item[slot=start]){padding-left:unset;padding-right:unset;-webkit-padding-start:0;padding-inline-start:0;-webkit-padding-end:16px;padding-inline-end:16px}}";
|
14
|
+
|
15
|
+
const toggleMdCss = ":host{box-sizing:content-box !important;display:inline-block;position:relative;outline:none;contain:content;cursor:pointer;touch-action:none;user-select:none;z-index:2}:host(.ion-focused) input{border:2px solid #5e9ed6}:host(.toggle-disabled){pointer-events:none}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;appearance:none;outline:none;display:flex;align-items:center;opacity:0;pointer-events:none}[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}.toggle-icon-wrapper{display:flex;position:relative;align-items:center;width:100%;height:100%;transition:var(--handle-transition);will-change:transform}.toggle-icon{border-radius:var(--border-radius);display:block;position:relative;width:100%;height:100%;background:var(--background);pointer-events:none;overflow:inherit}:host(.toggle-checked) .toggle-icon{background:var(--background-checked)}.toggle-inner{left:var(--handle-spacing);border-radius:var(--handle-border-radius);position:absolute;width:var(--handle-width);height:var(--handle-height);max-height:var(--handle-max-height);transition:var(--handle-transition);background:var(--handle-background);box-shadow:var(--handle-box-shadow);contain:strict}[dir=rtl] .toggle-inner,:host-context([dir=rtl]) .toggle-inner{left:unset;right:unset;right:var(--handle-spacing)}:host(.toggle-checked) .toggle-icon-wrapper{transform:translate3d(calc(100% - var(--handle-width)), 0, 0)}:host-context([dir=rtl]):host(.toggle-checked) .toggle-icon-wrapper,:host-context([dir=rtl]).toggle-checked .toggle-icon-wrapper{transform:translate3d(calc(-100% + var(--handle-width)), 0, 0)}:host(.toggle-checked) .toggle-inner{transform:translate3d(calc(var(--handle-spacing) * -2), 0, 0);background:var(--handle-background-checked)}:host-context([dir=rtl]):host(.toggle-checked) .toggle-inner,:host-context([dir=rtl]).toggle-checked .toggle-inner{transform:translate3d(calc(var(--handle-spacing) * 2), 0, 0)}:host{--background:rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.39);--background-checked:rgba(var(--ion-color-primary-rgb, 56, 128, 255), 0.5);--border-radius:14px;--handle-background:#ffffff;--handle-background-checked:var(--ion-color-primary, #3880ff);--handle-border-radius:50%;--handle-box-shadow:0 3px 1px -2px rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 1px 5px 0 rgba(0, 0, 0, 0.12);--handle-width:20px;--handle-height:20px;--handle-max-height:calc(100% + 6px);--handle-spacing:0;--handle-transition:transform 160ms cubic-bezier(0.4, 0, 0.2, 1), background-color 160ms cubic-bezier(0.4, 0, 0.2, 1);padding-left:12px;padding-right:12px;padding-top:12px;padding-bottom:12px;width:36px;height:14px;contain:strict}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){:host{padding-left:unset;padding-right:unset;-webkit-padding-start:12px;padding-inline-start:12px;-webkit-padding-end:12px;padding-inline-end:12px}}:host(.ion-color.toggle-checked) .toggle-icon{background:rgba(var(--ion-color-base-rgb), 0.5)}:host(.ion-color.toggle-checked) .toggle-inner{background:var(--ion-color-base)}:host(.toggle-checked) .toggle-inner{color:var(--ion-color-contrast, #fff)}.toggle-icon{transition:background-color 160ms}.toggle-inner{will-change:background-color, transform;display:flex;align-items:center;justify-content:center;color:#000}.toggle-inner .toggle-switch-icon{padding-left:1px;padding-right:1px;padding-top:1px;padding-bottom:1px;width:100%;height:100%}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){.toggle-inner .toggle-switch-icon{padding-left:unset;padding-right:unset;-webkit-padding-start:1px;padding-inline-start:1px;-webkit-padding-end:1px;padding-inline-end:1px}}:host(.toggle-disabled){opacity:0.3}:host(.in-item[slot]){margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;padding-left:16px;padding-right:0;padding-top:12px;padding-bottom:12px;cursor:pointer}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){:host(.in-item[slot]){padding-left:unset;padding-right:unset;-webkit-padding-start:16px;padding-inline-start:16px;-webkit-padding-end:0;padding-inline-end:0}}:host(.in-item[slot=start]){padding-left:2px;padding-right:18px;padding-top:12px;padding-bottom:12px}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){:host(.in-item[slot=start]){padding-left:unset;padding-right:unset;-webkit-padding-start:2px;padding-inline-start:2px;-webkit-padding-end:18px;padding-inline-end:18px}}";
|
16
|
+
|
17
|
+
const Toggle = class {
|
18
|
+
constructor(hostRef) {
|
19
|
+
index.registerInstance(this, hostRef);
|
20
|
+
this.ionChange = index.createEvent(this, "ionChange", 7);
|
21
|
+
this.ionFocus = index.createEvent(this, "ionFocus", 7);
|
22
|
+
this.ionBlur = index.createEvent(this, "ionBlur", 7);
|
23
|
+
this.ionStyle = index.createEvent(this, "ionStyle", 7);
|
24
|
+
this.inputId = `ion-tg-${toggleIds++}`;
|
25
|
+
this.lastDrag = 0;
|
26
|
+
this.activated = false;
|
27
|
+
/**
|
28
|
+
* The name of the control, which is submitted with the form data.
|
29
|
+
*/
|
30
|
+
this.name = this.inputId;
|
31
|
+
/**
|
32
|
+
* If `true`, the toggle is selected.
|
33
|
+
*/
|
34
|
+
this.checked = false;
|
35
|
+
/**
|
36
|
+
* If `true`, the user cannot interact with the toggle.
|
37
|
+
*/
|
38
|
+
this.disabled = false;
|
39
|
+
/**
|
40
|
+
* The value of the toggle does not mean if it's checked or not, use the `checked`
|
41
|
+
* property for that.
|
42
|
+
*
|
43
|
+
* The value of a toggle is analogous to the value of a `<input type="checkbox">`,
|
44
|
+
* it's only used when the toggle participates in a native `<form>`.
|
45
|
+
*/
|
46
|
+
this.value = 'on';
|
47
|
+
/**
|
48
|
+
* Enables the on/off accessibility switch labels within the toggle.
|
49
|
+
*/
|
50
|
+
this.enableOnOffLabels = undefined;
|
51
|
+
this.onClick = (ev) => {
|
52
|
+
ev.preventDefault();
|
53
|
+
if (this.lastDrag + 300 < Date.now()) {
|
54
|
+
this.checked = !this.checked;
|
55
|
+
}
|
56
|
+
};
|
57
|
+
this.onFocus = () => {
|
58
|
+
this.ionFocus.emit();
|
59
|
+
};
|
60
|
+
this.onBlur = () => {
|
61
|
+
this.ionBlur.emit();
|
62
|
+
};
|
63
|
+
this.getSwitchLabelIcon = (mode, checked) => {
|
64
|
+
if (mode === 'md') {
|
65
|
+
return checked ? index$1.checkmarkOutline : index$1.removeOutline;
|
66
|
+
}
|
67
|
+
return checked ? index$1.removeOutline : index$1.ellipseOutline;
|
68
|
+
};
|
69
|
+
}
|
70
|
+
checkedChanged(isChecked) {
|
71
|
+
this.ionChange.emit({
|
72
|
+
checked: isChecked,
|
73
|
+
value: this.value,
|
74
|
+
});
|
75
|
+
}
|
76
|
+
disabledChanged() {
|
77
|
+
this.emitStyle();
|
78
|
+
if (this.gesture) {
|
79
|
+
this.gesture.enable(!this.disabled);
|
80
|
+
}
|
81
|
+
}
|
82
|
+
async connectedCallback() {
|
83
|
+
this.gesture = (await Promise.resolve().then(function () { return require('./index-12082cba.js'); })).createGesture({
|
84
|
+
el: this.el,
|
85
|
+
gestureName: 'toggle',
|
86
|
+
gesturePriority: 100,
|
87
|
+
threshold: 5,
|
88
|
+
passive: false,
|
89
|
+
onStart: () => this.onStart(),
|
90
|
+
onMove: (ev) => this.onMove(ev),
|
91
|
+
onEnd: (ev) => this.onEnd(ev),
|
92
|
+
});
|
93
|
+
this.disabledChanged();
|
94
|
+
}
|
95
|
+
disconnectedCallback() {
|
96
|
+
if (this.gesture) {
|
97
|
+
this.gesture.destroy();
|
98
|
+
this.gesture = undefined;
|
99
|
+
}
|
100
|
+
}
|
101
|
+
componentWillLoad() {
|
102
|
+
this.emitStyle();
|
103
|
+
}
|
104
|
+
emitStyle() {
|
105
|
+
this.ionStyle.emit({
|
106
|
+
'interactive-disabled': this.disabled,
|
107
|
+
});
|
108
|
+
}
|
109
|
+
onStart() {
|
110
|
+
this.activated = true;
|
111
|
+
// touch-action does not work in iOS
|
112
|
+
this.setFocus();
|
113
|
+
}
|
114
|
+
onMove(detail) {
|
115
|
+
if (shouldToggle(dir.isRTL(this.el), this.checked, detail.deltaX, -10)) {
|
116
|
+
this.checked = !this.checked;
|
117
|
+
haptic.hapticSelection();
|
118
|
+
}
|
119
|
+
}
|
120
|
+
onEnd(ev) {
|
121
|
+
this.activated = false;
|
122
|
+
this.lastDrag = Date.now();
|
123
|
+
ev.event.preventDefault();
|
124
|
+
ev.event.stopImmediatePropagation();
|
125
|
+
}
|
126
|
+
getValue() {
|
127
|
+
return this.value || '';
|
128
|
+
}
|
129
|
+
setFocus() {
|
130
|
+
if (this.focusEl) {
|
131
|
+
this.focusEl.focus();
|
132
|
+
}
|
133
|
+
}
|
134
|
+
renderOnOffSwitchLabels(mode, checked) {
|
135
|
+
const icon = this.getSwitchLabelIcon(mode, checked);
|
136
|
+
return (index.h("ion-icon", { class: {
|
137
|
+
'toggle-switch-icon': true,
|
138
|
+
'toggle-switch-icon-checked': checked,
|
139
|
+
}, icon: icon }));
|
140
|
+
}
|
141
|
+
render() {
|
142
|
+
const { activated, color, checked, disabled, el, inputId, name, enableOnOffLabels } = this;
|
143
|
+
const mode = ionicGlobal.getIonMode(this);
|
144
|
+
const { label, labelId, labelText } = helpers.getAriaLabel(el, inputId);
|
145
|
+
const value = this.getValue();
|
146
|
+
helpers.renderHiddenInput(true, el, name, checked ? value : '', disabled);
|
147
|
+
return (index.h(index.Host, { onClick: this.onClick, "aria-labelledby": label ? labelId : null, "aria-checked": `${checked}`, "aria-hidden": disabled ? 'true' : null, role: "switch", class: theme.createColorClasses(color, {
|
148
|
+
[mode]: true,
|
149
|
+
'in-item': theme.hostContext('ion-item', el),
|
150
|
+
'toggle-activated': activated,
|
151
|
+
'toggle-checked': checked,
|
152
|
+
'toggle-disabled': disabled,
|
153
|
+
interactive: true,
|
154
|
+
}) }, index.h("div", { class: "toggle-icon", part: "track" }, enableOnOffLabels &&
|
155
|
+
mode === 'ios' && [this.renderOnOffSwitchLabels(mode, true), this.renderOnOffSwitchLabels(mode, false)], index.h("div", { class: "toggle-icon-wrapper" }, index.h("div", { class: "toggle-inner", part: "handle" }, enableOnOffLabels && mode === 'md' && this.renderOnOffSwitchLabels(mode, checked)))), index.h("label", { htmlFor: inputId }, labelText), index.h("input", { type: "checkbox", role: "switch", "aria-checked": `${checked}`, disabled: disabled, id: inputId, onFocus: () => this.onFocus(), onBlur: () => this.onBlur(), ref: (focusEl) => (this.focusEl = focusEl) })));
|
156
|
+
}
|
157
|
+
get el() { return index.getElement(this); }
|
158
|
+
static get watchers() { return {
|
159
|
+
"checked": ["checkedChanged"],
|
160
|
+
"disabled": ["disabledChanged"]
|
161
|
+
}; }
|
162
|
+
};
|
163
|
+
const shouldToggle = (rtl, checked, deltaX, margin) => {
|
164
|
+
if (checked) {
|
165
|
+
return (!rtl && margin > deltaX) || (rtl && -margin < deltaX);
|
166
|
+
}
|
167
|
+
else {
|
168
|
+
return (!rtl && -margin < deltaX) || (rtl && margin > deltaX);
|
169
|
+
}
|
170
|
+
};
|
171
|
+
let toggleIds = 0;
|
172
|
+
Toggle.style = {
|
173
|
+
ios: toggleIosCss,
|
174
|
+
md: toggleMdCss
|
175
|
+
};
|
176
|
+
|
177
|
+
exports.ion_toggle = Toggle;
|