@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,244 @@
|
|
1
|
+
import { r as registerInstance, i as createEvent, w as writeTask, h, H as Host, e as getElement } from './index-c04b9ed5.js';
|
2
|
+
import { g as getIonMode } from './ionic-global-4903e23e.js';
|
3
|
+
import { e as debounceEvent, i as inheritAriaAttributes, k as inheritAttributes, o as findItemLabel } from './helpers-03073fe4.js';
|
4
|
+
import { c as createColorClasses } from './theme-7ef00c83.js';
|
5
|
+
|
6
|
+
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}";
|
7
|
+
|
8
|
+
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}";
|
9
|
+
|
10
|
+
const Textarea = class {
|
11
|
+
constructor(hostRef) {
|
12
|
+
registerInstance(this, hostRef);
|
13
|
+
this.ionChange = createEvent(this, "ionChange", 7);
|
14
|
+
this.ionInput = createEvent(this, "ionInput", 7);
|
15
|
+
this.ionStyle = createEvent(this, "ionStyle", 7);
|
16
|
+
this.ionBlur = createEvent(this, "ionBlur", 7);
|
17
|
+
this.ionFocus = createEvent(this, "ionFocus", 7);
|
18
|
+
this.inputId = `ion-textarea-${textareaIds++}`;
|
19
|
+
this.didBlurAfterEdit = false;
|
20
|
+
this.inheritedAttributes = {};
|
21
|
+
/**
|
22
|
+
* This is required for a WebKit bug which requires us to
|
23
|
+
* blur and focus an input to properly focus the input in
|
24
|
+
* an item with delegatesFocus. It will no longer be needed
|
25
|
+
* with iOS 14.
|
26
|
+
*
|
27
|
+
* @internal
|
28
|
+
*/
|
29
|
+
this.fireFocusEvents = true;
|
30
|
+
this.hasFocus = false;
|
31
|
+
/**
|
32
|
+
* Indicates whether and how the text value should be automatically capitalized as it is entered/edited by the user.
|
33
|
+
* Available options: `"off"`, `"none"`, `"on"`, `"sentences"`, `"words"`, `"characters"`.
|
34
|
+
*/
|
35
|
+
this.autocapitalize = 'none';
|
36
|
+
/**
|
37
|
+
* This Boolean attribute lets you specify that a form control should have input focus when the page loads.
|
38
|
+
*/
|
39
|
+
this.autofocus = false;
|
40
|
+
/**
|
41
|
+
* If `true`, the value will be cleared after focus upon edit. Defaults to `true` when `type` is `"password"`, `false` for all other types.
|
42
|
+
*/
|
43
|
+
this.clearOnEdit = false;
|
44
|
+
/**
|
45
|
+
* 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`.
|
46
|
+
*/
|
47
|
+
this.debounce = 0;
|
48
|
+
/**
|
49
|
+
* If `true`, the user cannot interact with the textarea.
|
50
|
+
*/
|
51
|
+
this.disabled = false;
|
52
|
+
/**
|
53
|
+
* The name of the control, which is submitted with the form data.
|
54
|
+
*/
|
55
|
+
this.name = this.inputId;
|
56
|
+
/**
|
57
|
+
* If `true`, the user cannot modify the value.
|
58
|
+
*/
|
59
|
+
this.readonly = false;
|
60
|
+
/**
|
61
|
+
* If `true`, the user must fill in a value before submitting a form.
|
62
|
+
*/
|
63
|
+
this.required = false;
|
64
|
+
/**
|
65
|
+
* If `true`, the element will have its spelling and grammar checked.
|
66
|
+
*/
|
67
|
+
this.spellcheck = false;
|
68
|
+
/**
|
69
|
+
* If `true`, the textarea container will grow and shrink based
|
70
|
+
* on the contents of the textarea.
|
71
|
+
*/
|
72
|
+
this.autoGrow = false;
|
73
|
+
/**
|
74
|
+
* The value of the textarea.
|
75
|
+
*/
|
76
|
+
this.value = '';
|
77
|
+
this.onInput = (ev) => {
|
78
|
+
if (this.nativeInput) {
|
79
|
+
this.value = this.nativeInput.value;
|
80
|
+
}
|
81
|
+
this.emitStyle();
|
82
|
+
this.ionInput.emit(ev);
|
83
|
+
};
|
84
|
+
this.onFocus = (ev) => {
|
85
|
+
this.hasFocus = true;
|
86
|
+
this.focusChange();
|
87
|
+
if (this.fireFocusEvents) {
|
88
|
+
this.ionFocus.emit(ev);
|
89
|
+
}
|
90
|
+
};
|
91
|
+
this.onBlur = (ev) => {
|
92
|
+
this.hasFocus = false;
|
93
|
+
this.focusChange();
|
94
|
+
if (this.fireFocusEvents) {
|
95
|
+
this.ionBlur.emit(ev);
|
96
|
+
}
|
97
|
+
};
|
98
|
+
this.onKeyDown = () => {
|
99
|
+
this.checkClearOnEdit();
|
100
|
+
};
|
101
|
+
}
|
102
|
+
debounceChanged() {
|
103
|
+
this.ionChange = debounceEvent(this.ionChange, this.debounce);
|
104
|
+
}
|
105
|
+
disabledChanged() {
|
106
|
+
this.emitStyle();
|
107
|
+
}
|
108
|
+
/**
|
109
|
+
* Update the native input element when the value changes
|
110
|
+
*/
|
111
|
+
valueChanged() {
|
112
|
+
const nativeInput = this.nativeInput;
|
113
|
+
const value = this.getValue();
|
114
|
+
if (nativeInput && nativeInput.value !== value) {
|
115
|
+
nativeInput.value = value;
|
116
|
+
}
|
117
|
+
this.runAutoGrow();
|
118
|
+
this.emitStyle();
|
119
|
+
this.ionChange.emit({ value });
|
120
|
+
}
|
121
|
+
connectedCallback() {
|
122
|
+
this.emitStyle();
|
123
|
+
this.debounceChanged();
|
124
|
+
{
|
125
|
+
document.dispatchEvent(new CustomEvent('ionInputDidLoad', {
|
126
|
+
detail: this.el,
|
127
|
+
}));
|
128
|
+
}
|
129
|
+
}
|
130
|
+
disconnectedCallback() {
|
131
|
+
{
|
132
|
+
document.dispatchEvent(new CustomEvent('ionInputDidUnload', {
|
133
|
+
detail: this.el,
|
134
|
+
}));
|
135
|
+
}
|
136
|
+
}
|
137
|
+
componentWillLoad() {
|
138
|
+
this.inheritedAttributes = Object.assign(Object.assign({}, inheritAriaAttributes(this.el)), inheritAttributes(this.el, ['title']));
|
139
|
+
}
|
140
|
+
componentDidLoad() {
|
141
|
+
this.runAutoGrow();
|
142
|
+
}
|
143
|
+
/**
|
144
|
+
* Sets focus on the native `textarea` in `ion-textarea`. Use this method instead of the global
|
145
|
+
* `textarea.focus()`.
|
146
|
+
*/
|
147
|
+
async setFocus() {
|
148
|
+
if (this.nativeInput) {
|
149
|
+
this.nativeInput.focus();
|
150
|
+
}
|
151
|
+
}
|
152
|
+
/**
|
153
|
+
* Sets blur on the native `textarea` in `ion-textarea`. Use this method instead of the global
|
154
|
+
* `textarea.blur()`.
|
155
|
+
* @internal
|
156
|
+
*/
|
157
|
+
async setBlur() {
|
158
|
+
if (this.nativeInput) {
|
159
|
+
this.nativeInput.blur();
|
160
|
+
}
|
161
|
+
}
|
162
|
+
/**
|
163
|
+
* Returns the native `<textarea>` element used under the hood.
|
164
|
+
*/
|
165
|
+
getInputElement() {
|
166
|
+
return Promise.resolve(this.nativeInput);
|
167
|
+
}
|
168
|
+
emitStyle() {
|
169
|
+
this.ionStyle.emit({
|
170
|
+
interactive: true,
|
171
|
+
textarea: true,
|
172
|
+
input: true,
|
173
|
+
'interactive-disabled': this.disabled,
|
174
|
+
'has-placeholder': this.placeholder !== undefined,
|
175
|
+
'has-value': this.hasValue(),
|
176
|
+
'has-focus': this.hasFocus,
|
177
|
+
});
|
178
|
+
}
|
179
|
+
runAutoGrow() {
|
180
|
+
if (this.nativeInput && this.autoGrow) {
|
181
|
+
writeTask(() => {
|
182
|
+
var _a;
|
183
|
+
if (this.textareaWrapper) {
|
184
|
+
// Replicated value is an attribute to be used in the stylesheet
|
185
|
+
// to set the inner contents of a pseudo element.
|
186
|
+
this.textareaWrapper.dataset.replicatedValue = (_a = this.value) !== null && _a !== void 0 ? _a : '';
|
187
|
+
}
|
188
|
+
});
|
189
|
+
}
|
190
|
+
}
|
191
|
+
/**
|
192
|
+
* Check if we need to clear the text input if clearOnEdit is enabled
|
193
|
+
*/
|
194
|
+
checkClearOnEdit() {
|
195
|
+
if (!this.clearOnEdit) {
|
196
|
+
return;
|
197
|
+
}
|
198
|
+
// Did the input value change after it was blurred and edited?
|
199
|
+
if (this.didBlurAfterEdit && this.hasValue()) {
|
200
|
+
// Clear the input
|
201
|
+
this.value = '';
|
202
|
+
}
|
203
|
+
// Reset the flag
|
204
|
+
this.didBlurAfterEdit = false;
|
205
|
+
}
|
206
|
+
focusChange() {
|
207
|
+
// If clearOnEdit is enabled and the input blurred but has a value, set a flag
|
208
|
+
if (this.clearOnEdit && !this.hasFocus && this.hasValue()) {
|
209
|
+
this.didBlurAfterEdit = true;
|
210
|
+
}
|
211
|
+
this.emitStyle();
|
212
|
+
}
|
213
|
+
hasValue() {
|
214
|
+
return this.getValue() !== '';
|
215
|
+
}
|
216
|
+
getValue() {
|
217
|
+
return this.value || '';
|
218
|
+
}
|
219
|
+
render() {
|
220
|
+
const mode = getIonMode(this);
|
221
|
+
const value = this.getValue();
|
222
|
+
const labelId = this.inputId + '-lbl';
|
223
|
+
const label = findItemLabel(this.el);
|
224
|
+
if (label) {
|
225
|
+
label.id = labelId;
|
226
|
+
}
|
227
|
+
return (h(Host, { "aria-disabled": this.disabled ? 'true' : null, class: createColorClasses(this.color, {
|
228
|
+
[mode]: true,
|
229
|
+
}) }, h("div", { class: "textarea-wrapper", ref: (el) => (this.textareaWrapper = el) }, 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))));
|
230
|
+
}
|
231
|
+
get el() { return getElement(this); }
|
232
|
+
static get watchers() { return {
|
233
|
+
"debounce": ["debounceChanged"],
|
234
|
+
"disabled": ["disabledChanged"],
|
235
|
+
"value": ["valueChanged"]
|
236
|
+
}; }
|
237
|
+
};
|
238
|
+
let textareaIds = 0;
|
239
|
+
Textarea.style = {
|
240
|
+
ios: textareaIosCss,
|
241
|
+
md: textareaMdCss
|
242
|
+
};
|
243
|
+
|
244
|
+
export { Textarea as ion_textarea };
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import { r as registerInstance, h, H as Host } from './index-
|
2
|
-
import { g as getIonMode } from './ionic-global-
|
1
|
+
import { r as registerInstance, h, H as Host } from './index-c04b9ed5.js';
|
2
|
+
import { g as getIonMode } from './ionic-global-4903e23e.js';
|
3
3
|
|
4
4
|
const thumbnailCss = ":host{--size:48px;--border-radius:0;border-radius:var(--border-radius);display:block;width:var(--size);height:var(--size)}::slotted(ion-img),::slotted(img){border-radius:var(--border-radius);width:100%;height:100%;object-fit:cover;overflow:hidden}";
|
5
5
|
|
@@ -1,10 +1,10 @@
|
|
1
|
-
import { r as registerInstance,
|
2
|
-
import { g as getIonMode } from './ionic-global-
|
3
|
-
import { i as isCancel, p as prepareOverlay, a as present, d as dismiss, e as eventMethod, s as safeCall } from './overlays-
|
1
|
+
import { r as registerInstance, i as createEvent, h, H as Host, e as getElement } from './index-c04b9ed5.js';
|
2
|
+
import { g as getIonMode } from './ionic-global-4903e23e.js';
|
3
|
+
import { i as isCancel, p as prepareOverlay, a as present, d as dismiss, e as eventMethod, s as safeCall } from './overlays-bdd9344a.js';
|
4
4
|
import { s as sanitizeDOMString } from './index-be6112f8.js';
|
5
5
|
import { g as getClassMap, c as createColorClasses } from './theme-7ef00c83.js';
|
6
|
-
import { c as createAnimation } from './animation-
|
7
|
-
import { g as getElementRoot } from './helpers-
|
6
|
+
import { c as createAnimation } from './animation-e0716b39.js';
|
7
|
+
import { g as getElementRoot } from './helpers-03073fe4.js';
|
8
8
|
import './hardware-back-button-fa04d6e9.js';
|
9
9
|
|
10
10
|
/*!
|
@@ -0,0 +1,173 @@
|
|
1
|
+
import { r as registerInstance, i as createEvent, h, H as Host, e as getElement } from './index-c04b9ed5.js';
|
2
|
+
import { t as checkmarkOutline, u as removeOutline, v as ellipseOutline } from './index-4044fde9.js';
|
3
|
+
import { g as getIonMode } from './ionic-global-4903e23e.js';
|
4
|
+
import { h as getAriaLabel, j as renderHiddenInput } from './helpers-03073fe4.js';
|
5
|
+
import { d as hapticSelection } from './haptic-522f76f2.js';
|
6
|
+
import { i as isRTL } from './dir-03012648.js';
|
7
|
+
import { c as createColorClasses, h as hostContext } from './theme-7ef00c83.js';
|
8
|
+
|
9
|
+
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}}";
|
10
|
+
|
11
|
+
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}}";
|
12
|
+
|
13
|
+
const Toggle = class {
|
14
|
+
constructor(hostRef) {
|
15
|
+
registerInstance(this, hostRef);
|
16
|
+
this.ionChange = createEvent(this, "ionChange", 7);
|
17
|
+
this.ionFocus = createEvent(this, "ionFocus", 7);
|
18
|
+
this.ionBlur = createEvent(this, "ionBlur", 7);
|
19
|
+
this.ionStyle = createEvent(this, "ionStyle", 7);
|
20
|
+
this.inputId = `ion-tg-${toggleIds++}`;
|
21
|
+
this.lastDrag = 0;
|
22
|
+
this.activated = false;
|
23
|
+
/**
|
24
|
+
* The name of the control, which is submitted with the form data.
|
25
|
+
*/
|
26
|
+
this.name = this.inputId;
|
27
|
+
/**
|
28
|
+
* If `true`, the toggle is selected.
|
29
|
+
*/
|
30
|
+
this.checked = false;
|
31
|
+
/**
|
32
|
+
* If `true`, the user cannot interact with the toggle.
|
33
|
+
*/
|
34
|
+
this.disabled = false;
|
35
|
+
/**
|
36
|
+
* The value of the toggle does not mean if it's checked or not, use the `checked`
|
37
|
+
* property for that.
|
38
|
+
*
|
39
|
+
* The value of a toggle is analogous to the value of a `<input type="checkbox">`,
|
40
|
+
* it's only used when the toggle participates in a native `<form>`.
|
41
|
+
*/
|
42
|
+
this.value = 'on';
|
43
|
+
/**
|
44
|
+
* Enables the on/off accessibility switch labels within the toggle.
|
45
|
+
*/
|
46
|
+
this.enableOnOffLabels = undefined;
|
47
|
+
this.onClick = (ev) => {
|
48
|
+
ev.preventDefault();
|
49
|
+
if (this.lastDrag + 300 < Date.now()) {
|
50
|
+
this.checked = !this.checked;
|
51
|
+
}
|
52
|
+
};
|
53
|
+
this.onFocus = () => {
|
54
|
+
this.ionFocus.emit();
|
55
|
+
};
|
56
|
+
this.onBlur = () => {
|
57
|
+
this.ionBlur.emit();
|
58
|
+
};
|
59
|
+
this.getSwitchLabelIcon = (mode, checked) => {
|
60
|
+
if (mode === 'md') {
|
61
|
+
return checked ? checkmarkOutline : removeOutline;
|
62
|
+
}
|
63
|
+
return checked ? removeOutline : ellipseOutline;
|
64
|
+
};
|
65
|
+
}
|
66
|
+
checkedChanged(isChecked) {
|
67
|
+
this.ionChange.emit({
|
68
|
+
checked: isChecked,
|
69
|
+
value: this.value,
|
70
|
+
});
|
71
|
+
}
|
72
|
+
disabledChanged() {
|
73
|
+
this.emitStyle();
|
74
|
+
if (this.gesture) {
|
75
|
+
this.gesture.enable(!this.disabled);
|
76
|
+
}
|
77
|
+
}
|
78
|
+
async connectedCallback() {
|
79
|
+
this.gesture = (await import('./index-21661af2.js')).createGesture({
|
80
|
+
el: this.el,
|
81
|
+
gestureName: 'toggle',
|
82
|
+
gesturePriority: 100,
|
83
|
+
threshold: 5,
|
84
|
+
passive: false,
|
85
|
+
onStart: () => this.onStart(),
|
86
|
+
onMove: (ev) => this.onMove(ev),
|
87
|
+
onEnd: (ev) => this.onEnd(ev),
|
88
|
+
});
|
89
|
+
this.disabledChanged();
|
90
|
+
}
|
91
|
+
disconnectedCallback() {
|
92
|
+
if (this.gesture) {
|
93
|
+
this.gesture.destroy();
|
94
|
+
this.gesture = undefined;
|
95
|
+
}
|
96
|
+
}
|
97
|
+
componentWillLoad() {
|
98
|
+
this.emitStyle();
|
99
|
+
}
|
100
|
+
emitStyle() {
|
101
|
+
this.ionStyle.emit({
|
102
|
+
'interactive-disabled': this.disabled,
|
103
|
+
});
|
104
|
+
}
|
105
|
+
onStart() {
|
106
|
+
this.activated = true;
|
107
|
+
// touch-action does not work in iOS
|
108
|
+
this.setFocus();
|
109
|
+
}
|
110
|
+
onMove(detail) {
|
111
|
+
if (shouldToggle(isRTL(this.el), this.checked, detail.deltaX, -10)) {
|
112
|
+
this.checked = !this.checked;
|
113
|
+
hapticSelection();
|
114
|
+
}
|
115
|
+
}
|
116
|
+
onEnd(ev) {
|
117
|
+
this.activated = false;
|
118
|
+
this.lastDrag = Date.now();
|
119
|
+
ev.event.preventDefault();
|
120
|
+
ev.event.stopImmediatePropagation();
|
121
|
+
}
|
122
|
+
getValue() {
|
123
|
+
return this.value || '';
|
124
|
+
}
|
125
|
+
setFocus() {
|
126
|
+
if (this.focusEl) {
|
127
|
+
this.focusEl.focus();
|
128
|
+
}
|
129
|
+
}
|
130
|
+
renderOnOffSwitchLabels(mode, checked) {
|
131
|
+
const icon = this.getSwitchLabelIcon(mode, checked);
|
132
|
+
return (h("ion-icon", { class: {
|
133
|
+
'toggle-switch-icon': true,
|
134
|
+
'toggle-switch-icon-checked': checked,
|
135
|
+
}, icon: icon }));
|
136
|
+
}
|
137
|
+
render() {
|
138
|
+
const { activated, color, checked, disabled, el, inputId, name, enableOnOffLabels } = this;
|
139
|
+
const mode = getIonMode(this);
|
140
|
+
const { label, labelId, labelText } = getAriaLabel(el, inputId);
|
141
|
+
const value = this.getValue();
|
142
|
+
renderHiddenInput(true, el, name, checked ? value : '', disabled);
|
143
|
+
return (h(Host, { onClick: this.onClick, "aria-labelledby": label ? labelId : null, "aria-checked": `${checked}`, "aria-hidden": disabled ? 'true' : null, role: "switch", class: createColorClasses(color, {
|
144
|
+
[mode]: true,
|
145
|
+
'in-item': hostContext('ion-item', el),
|
146
|
+
'toggle-activated': activated,
|
147
|
+
'toggle-checked': checked,
|
148
|
+
'toggle-disabled': disabled,
|
149
|
+
interactive: true,
|
150
|
+
}) }, h("div", { class: "toggle-icon", part: "track" }, enableOnOffLabels &&
|
151
|
+
mode === 'ios' && [this.renderOnOffSwitchLabels(mode, true), this.renderOnOffSwitchLabels(mode, false)], h("div", { class: "toggle-icon-wrapper" }, h("div", { class: "toggle-inner", part: "handle" }, enableOnOffLabels && mode === 'md' && this.renderOnOffSwitchLabels(mode, checked)))), h("label", { htmlFor: inputId }, labelText), h("input", { type: "checkbox", role: "switch", "aria-checked": `${checked}`, disabled: disabled, id: inputId, onFocus: () => this.onFocus(), onBlur: () => this.onBlur(), ref: (focusEl) => (this.focusEl = focusEl) })));
|
152
|
+
}
|
153
|
+
get el() { return getElement(this); }
|
154
|
+
static get watchers() { return {
|
155
|
+
"checked": ["checkedChanged"],
|
156
|
+
"disabled": ["disabledChanged"]
|
157
|
+
}; }
|
158
|
+
};
|
159
|
+
const shouldToggle = (rtl, checked, deltaX, margin) => {
|
160
|
+
if (checked) {
|
161
|
+
return (!rtl && margin > deltaX) || (rtl && -margin < deltaX);
|
162
|
+
}
|
163
|
+
else {
|
164
|
+
return (!rtl && -margin < deltaX) || (rtl && margin > deltaX);
|
165
|
+
}
|
166
|
+
};
|
167
|
+
let toggleIds = 0;
|
168
|
+
Toggle.style = {
|
169
|
+
ios: toggleIosCss,
|
170
|
+
md: toggleMdCss
|
171
|
+
};
|
172
|
+
|
173
|
+
export { Toggle as ion_toggle };
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import { r as registerInstance, j as readTask, w as writeTask, f as forceUpdate, h, H as Host,
|
2
|
-
import { c as componentOnReady } from './helpers-
|
1
|
+
import { r as registerInstance, j as readTask, w as writeTask, f as forceUpdate, h, H as Host, e as getElement } from './index-c04b9ed5.js';
|
2
|
+
import { c as componentOnReady } from './helpers-03073fe4.js';
|
3
3
|
|
4
4
|
/*!
|
5
5
|
* (C) Ionic http://ionicframework.com - MIT License
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { g as getMode, C as Context, s as setPlatformHelpers, a as setMode } from './index-
|
1
|
+
import { g as getMode, C as Context, s as setPlatformHelpers, a as setMode } from './index-c04b9ed5.js';
|
2
2
|
|
3
3
|
/*!
|
4
4
|
* (C) Ionic http://ionicframework.com - MIT License
|
@@ -1,7 +1,7 @@
|
|
1
|
-
import { c as createAnimation } from './animation-
|
2
|
-
import { g as getIonPageElement } from './index-
|
3
|
-
import './helpers-
|
4
|
-
import './index-
|
1
|
+
import { c as createAnimation } from './animation-e0716b39.js';
|
2
|
+
import { g as getIonPageElement } from './index-b4b4e503.js';
|
3
|
+
import './helpers-03073fe4.js';
|
4
|
+
import './index-c04b9ed5.js';
|
5
5
|
|
6
6
|
/*!
|
7
7
|
* (C) Ionic http://ionicframework.com - MIT License
|