@frankenstyle/uikit 0.0.1
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/.prettierignore +15 -0
- package/.prettierrc.json +12 -0
- package/BACKERS.md +5 -0
- package/CHANGELOG.md +3759 -0
- package/CONTRIBUTING.md +96 -0
- package/LICENSE.md +7 -0
- package/README.md +65 -0
- package/build/build.js +95 -0
- package/build/icons.js +35 -0
- package/build/less.js +95 -0
- package/build/package.json +4 -0
- package/build/prefix.js +76 -0
- package/build/publishDev.js +33 -0
- package/build/release.js +123 -0
- package/build/scope.js +106 -0
- package/build/scss/mixin.scss +32 -0
- package/build/scss.js +252 -0
- package/build/util.js +288 -0
- package/build/wrapper/component.js +7 -0
- package/build/wrapper/icons.js +13 -0
- package/composer.json +17 -0
- package/dist/css/uikit-rtl.css +13333 -0
- package/dist/css/uikit-rtl.min.css +1 -0
- package/dist/css/uikit.css +13333 -0
- package/dist/css/uikit.min.css +1 -0
- package/dist/js/components/.gitkeep +0 -0
- package/dist/js/components/countdown.js +112 -0
- package/dist/js/components/countdown.min.js +1 -0
- package/dist/js/components/filter.js +527 -0
- package/dist/js/components/filter.min.js +1 -0
- package/dist/js/components/lightbox-panel.js +1695 -0
- package/dist/js/components/lightbox-panel.min.js +1 -0
- package/dist/js/components/lightbox.js +1783 -0
- package/dist/js/components/lightbox.min.js +1 -0
- package/dist/js/components/notification.js +127 -0
- package/dist/js/components/notification.min.js +1 -0
- package/dist/js/components/parallax.js +726 -0
- package/dist/js/components/parallax.min.js +1 -0
- package/dist/js/components/slider-parallax.js +637 -0
- package/dist/js/components/slider-parallax.min.js +1 -0
- package/dist/js/components/slider.js +1731 -0
- package/dist/js/components/slider.min.js +1 -0
- package/dist/js/components/slideshow-parallax.js +637 -0
- package/dist/js/components/slideshow-parallax.min.js +1 -0
- package/dist/js/components/slideshow.js +1555 -0
- package/dist/js/components/slideshow.min.js +1 -0
- package/dist/js/components/sortable.js +680 -0
- package/dist/js/components/sortable.min.js +1 -0
- package/dist/js/components/tooltip.js +446 -0
- package/dist/js/components/tooltip.min.js +1 -0
- package/dist/js/components/upload.js +235 -0
- package/dist/js/components/upload.min.js +1 -0
- package/dist/js/uikit-core.js +6726 -0
- package/dist/js/uikit-core.min.js +1 -0
- package/dist/js/uikit-icons.js +184 -0
- package/dist/js/uikit-icons.min.js +1 -0
- package/dist/js/uikit.js +10077 -0
- package/dist/js/uikit.min.js +1 -0
- package/eslint.config.mjs +35 -0
- package/jsconfig.json +9 -0
- package/package.json +66 -0
- package/src/images/backgrounds/accordion-close.svg +4 -0
- package/src/images/backgrounds/accordion-open.svg +3 -0
- package/src/images/backgrounds/divider-icon.svg +3 -0
- package/src/images/backgrounds/form-checkbox-indeterminate.svg +3 -0
- package/src/images/backgrounds/form-checkbox.svg +3 -0
- package/src/images/backgrounds/form-datalist.svg +3 -0
- package/src/images/backgrounds/form-radio.svg +3 -0
- package/src/images/backgrounds/form-select.svg +4 -0
- package/src/images/backgrounds/list-bullet.svg +3 -0
- package/src/images/components/close-icon.svg +1 -0
- package/src/images/components/close-large.svg +1 -0
- package/src/images/components/drop-parent-icon.svg +1 -0
- package/src/images/components/marker.svg +1 -0
- package/src/images/components/nav-parent-icon-large.svg +1 -0
- package/src/images/components/nav-parent-icon.svg +1 -0
- package/src/images/components/navbar-parent-icon.svg +1 -0
- package/src/images/components/navbar-toggle-icon.svg +34 -0
- package/src/images/components/overlay-icon.svg +1 -0
- package/src/images/components/pagination-next.svg +1 -0
- package/src/images/components/pagination-previous.svg +1 -0
- package/src/images/components/search-icon.svg +1 -0
- package/src/images/components/search-large.svg +1 -0
- package/src/images/components/search-medium.svg +1 -0
- package/src/images/components/slidenav-next-large.svg +1 -0
- package/src/images/components/slidenav-next.svg +1 -0
- package/src/images/components/slidenav-previous-large.svg +1 -0
- package/src/images/components/slidenav-previous.svg +1 -0
- package/src/images/components/spinner.svg +3 -0
- package/src/images/components/totop.svg +1 -0
- package/src/images/icons/500px.svg +30 -0
- package/src/images/icons/album.svg +5 -0
- package/src/images/icons/android-robot.svg +6 -0
- package/src/images/icons/android.svg +3 -0
- package/src/images/icons/apple.svg +3 -0
- package/src/images/icons/arrow-down-arrow-up.svg +6 -0
- package/src/images/icons/arrow-down.svg +4 -0
- package/src/images/icons/arrow-left.svg +4 -0
- package/src/images/icons/arrow-right.svg +4 -0
- package/src/images/icons/arrow-up-right.svg +4 -0
- package/src/images/icons/arrow-up.svg +4 -0
- package/src/images/icons/bag.svg +4 -0
- package/src/images/icons/ban.svg +4 -0
- package/src/images/icons/behance.svg +5 -0
- package/src/images/icons/bell.svg +4 -0
- package/src/images/icons/bluesky.svg +3 -0
- package/src/images/icons/bold.svg +3 -0
- package/src/images/icons/bolt.svg +3 -0
- package/src/images/icons/bookmark.svg +3 -0
- package/src/images/icons/calendar.svg +5 -0
- package/src/images/icons/camera.svg +4 -0
- package/src/images/icons/cart.svg +5 -0
- package/src/images/icons/check.svg +3 -0
- package/src/images/icons/chevron-double-left.svg +4 -0
- package/src/images/icons/chevron-double-right.svg +4 -0
- package/src/images/icons/chevron-down.svg +3 -0
- package/src/images/icons/chevron-left.svg +3 -0
- package/src/images/icons/chevron-right.svg +3 -0
- package/src/images/icons/chevron-up.svg +3 -0
- package/src/images/icons/clock.svg +5 -0
- package/src/images/icons/close-circle.svg +5 -0
- package/src/images/icons/close.svg +4 -0
- package/src/images/icons/cloud-download.svg +5 -0
- package/src/images/icons/cloud-upload.svg +5 -0
- package/src/images/icons/code.svg +4 -0
- package/src/images/icons/cog.svg +4 -0
- package/src/images/icons/comment.svg +3 -0
- package/src/images/icons/commenting.svg +6 -0
- package/src/images/icons/comments.svg +4 -0
- package/src/images/icons/copy.svg +4 -0
- package/src/images/icons/credit-card.svg +4 -0
- package/src/images/icons/crosshairs.svg +7 -0
- package/src/images/icons/database.svg +6 -0
- package/src/images/icons/desktop.svg +6 -0
- package/src/images/icons/discord.svg +3 -0
- package/src/images/icons/download.svg +5 -0
- package/src/images/icons/dribbble.svg +6 -0
- package/src/images/icons/etsy.svg +3 -0
- package/src/images/icons/expand.svg +6 -0
- package/src/images/icons/eye-slash.svg +5 -0
- package/src/images/icons/eye.svg +4 -0
- package/src/images/icons/facebook.svg +3 -0
- package/src/images/icons/file-edit.svg +4 -0
- package/src/images/icons/file-pdf.svg +4 -0
- package/src/images/icons/file-text.svg +7 -0
- package/src/images/icons/file.svg +3 -0
- package/src/images/icons/flickr.svg +4 -0
- package/src/images/icons/folder.svg +3 -0
- package/src/images/icons/forward.svg +3 -0
- package/src/images/icons/foursquare.svg +3 -0
- package/src/images/icons/future.svg +6 -0
- package/src/images/icons/git-branch.svg +6 -0
- package/src/images/icons/git-fork.svg +6 -0
- package/src/images/icons/github-alt.svg +3 -0
- package/src/images/icons/github.svg +3 -0
- package/src/images/icons/gitter.svg +6 -0
- package/src/images/icons/google.svg +3 -0
- package/src/images/icons/grid.svg +11 -0
- package/src/images/icons/happy.svg +6 -0
- package/src/images/icons/hashtag.svg +3 -0
- package/src/images/icons/heart.svg +3 -0
- package/src/images/icons/history.svg +6 -0
- package/src/images/icons/home.svg +5 -0
- package/src/images/icons/image.svg +6 -0
- package/src/images/icons/info.svg +4 -0
- package/src/images/icons/instagram.svg +5 -0
- package/src/images/icons/italic.svg +3 -0
- package/src/images/icons/joomla.svg +6 -0
- package/src/images/icons/laptop.svg +4 -0
- package/src/images/icons/lifesaver.svg +12 -0
- package/src/images/icons/link-external.svg +5 -0
- package/src/images/icons/link.svg +5 -0
- package/src/images/icons/linkedin.svg +4 -0
- package/src/images/icons/list.svg +8 -0
- package/src/images/icons/location.svg +4 -0
- package/src/images/icons/lock.svg +4 -0
- package/src/images/icons/mail.svg +4 -0
- package/src/images/icons/mastodon.svg +3 -0
- package/src/images/icons/menu.svg +5 -0
- package/src/images/icons/microphone.svg +6 -0
- package/src/images/icons/microsoft.svg +3 -0
- package/src/images/icons/minus-circle.svg +4 -0
- package/src/images/icons/minus.svg +3 -0
- package/src/images/icons/more-vertical.svg +5 -0
- package/src/images/icons/more.svg +5 -0
- package/src/images/icons/move.svg +8 -0
- package/src/images/icons/nut.svg +4 -0
- package/src/images/icons/paint-bucket.svg +6 -0
- package/src/images/icons/pencil.svg +4 -0
- package/src/images/icons/phone-landscape.svg +4 -0
- package/src/images/icons/phone.svg +4 -0
- package/src/images/icons/pinterest.svg +3 -0
- package/src/images/icons/play-circle.svg +4 -0
- package/src/images/icons/play.svg +3 -0
- package/src/images/icons/plus-circle.svg +5 -0
- package/src/images/icons/plus.svg +4 -0
- package/src/images/icons/print.svg +7 -0
- package/src/images/icons/pull.svg +5 -0
- package/src/images/icons/push.svg +5 -0
- package/src/images/icons/question.svg +5 -0
- package/src/images/icons/quote-right.svg +4 -0
- package/src/images/icons/receiver.svg +3 -0
- package/src/images/icons/reddit.svg +6 -0
- package/src/images/icons/refresh.svg +4 -0
- package/src/images/icons/reply.svg +3 -0
- package/src/images/icons/rss.svg +5 -0
- package/src/images/icons/search.svg +4 -0
- package/src/images/icons/server.svg +15 -0
- package/src/images/icons/settings.svg +11 -0
- package/src/images/icons/shrink.svg +6 -0
- package/src/images/icons/sign-in.svg +5 -0
- package/src/images/icons/sign-out.svg +5 -0
- package/src/images/icons/signal.svg +3 -0
- package/src/images/icons/social.svg +7 -0
- package/src/images/icons/sorting.svg +6 -0
- package/src/images/icons/soundcloud.svg +6 -0
- package/src/images/icons/star.svg +3 -0
- package/src/images/icons/strikethrough.svg +4 -0
- package/src/images/icons/table.svg +6 -0
- package/src/images/icons/tablet-landscape.svg +4 -0
- package/src/images/icons/tablet.svg +4 -0
- package/src/images/icons/tag.svg +4 -0
- package/src/images/icons/telegram.svg +3 -0
- package/src/images/icons/threads.svg +3 -0
- package/src/images/icons/thumbnails.svg +6 -0
- package/src/images/icons/tiktok.svg +3 -0
- package/src/images/icons/trash.svg +7 -0
- package/src/images/icons/triangle-down.svg +3 -0
- package/src/images/icons/triangle-left.svg +3 -0
- package/src/images/icons/triangle-right.svg +3 -0
- package/src/images/icons/triangle-up.svg +3 -0
- package/src/images/icons/tripadvisor.svg +19 -0
- package/src/images/icons/tumblr.svg +3 -0
- package/src/images/icons/tv.svg +4 -0
- package/src/images/icons/twitch.svg +5 -0
- package/src/images/icons/twitter.svg +3 -0
- package/src/images/icons/uikit.svg +4 -0
- package/src/images/icons/unlock.svg +4 -0
- package/src/images/icons/upload.svg +5 -0
- package/src/images/icons/user.svg +4 -0
- package/src/images/icons/users.svg +5 -0
- package/src/images/icons/video-camera.svg +3 -0
- package/src/images/icons/vimeo.svg +3 -0
- package/src/images/icons/warning.svg +5 -0
- package/src/images/icons/whatsapp.svg +3 -0
- package/src/images/icons/wordpress.svg +3 -0
- package/src/images/icons/world.svg +7 -0
- package/src/images/icons/x.svg +3 -0
- package/src/images/icons/xing.svg +4 -0
- package/src/images/icons/yelp.svg +15 -0
- package/src/images/icons/yootheme.svg +3 -0
- package/src/images/icons/youtube.svg +3 -0
- package/src/js/api/app.js +12 -0
- package/src/js/api/boot.js +84 -0
- package/src/js/api/component.js +84 -0
- package/src/js/api/computed.js +80 -0
- package/src/js/api/events.js +33 -0
- package/src/js/api/global.js +74 -0
- package/src/js/api/hooks.js +51 -0
- package/src/js/api/index.js +8 -0
- package/src/js/api/instance.js +66 -0
- package/src/js/api/log.js +10 -0
- package/src/js/api/observables.js +132 -0
- package/src/js/api/observer.js +64 -0
- package/src/js/api/options.js +180 -0
- package/src/js/api/props.js +107 -0
- package/src/js/api/state.js +65 -0
- package/src/js/api/update.js +66 -0
- package/src/js/api/watch.js +30 -0
- package/src/js/components/countdown.js +113 -0
- package/src/js/components/filter.js +211 -0
- package/src/js/components/index.js +13 -0
- package/src/js/components/internal/lightbox-animations.js +40 -0
- package/src/js/components/internal/slider-preload.js +14 -0
- package/src/js/components/internal/slider-transitioner.js +186 -0
- package/src/js/components/internal/slideshow-animations.js +100 -0
- package/src/js/components/lightbox-panel.js +482 -0
- package/src/js/components/lightbox.js +136 -0
- package/src/js/components/notification.js +134 -0
- package/src/js/components/parallax.js +86 -0
- package/src/js/components/slider-parallax.js +81 -0
- package/src/js/components/slider.js +388 -0
- package/src/js/components/slideshow-parallax.js +1 -0
- package/src/js/components/slideshow.js +44 -0
- package/src/js/components/sortable.js +448 -0
- package/src/js/components/tooltip.js +183 -0
- package/src/js/components/upload.js +248 -0
- package/src/js/core/accordion.js +244 -0
- package/src/js/core/alert.js +59 -0
- package/src/js/core/cover.js +57 -0
- package/src/js/core/drop.js +514 -0
- package/src/js/core/dropnav.js +449 -0
- package/src/js/core/form-custom.js +74 -0
- package/src/js/core/grid.js +210 -0
- package/src/js/core/height-match.js +79 -0
- package/src/js/core/height-placeholder.js +35 -0
- package/src/js/core/height-viewport.js +98 -0
- package/src/js/core/icon.js +285 -0
- package/src/js/core/img.js +157 -0
- package/src/js/core/index.js +49 -0
- package/src/js/core/inverse.js +173 -0
- package/src/js/core/leader.js +52 -0
- package/src/js/core/margin.js +125 -0
- package/src/js/core/modal.js +179 -0
- package/src/js/core/nav.js +11 -0
- package/src/js/core/navbar.js +96 -0
- package/src/js/core/offcanvas.js +178 -0
- package/src/js/core/overflow-auto.js +50 -0
- package/src/js/core/overflow-fade.js +67 -0
- package/src/js/core/responsive.js +10 -0
- package/src/js/core/scroll.js +71 -0
- package/src/js/core/scrollspy-nav.js +112 -0
- package/src/js/core/scrollspy.js +141 -0
- package/src/js/core/sticky.js +509 -0
- package/src/js/core/svg.js +101 -0
- package/src/js/core/switcher.js +246 -0
- package/src/js/core/tab.js +31 -0
- package/src/js/core/toggle.js +225 -0
- package/src/js/core/video.js +128 -0
- package/src/js/mixin/animate.js +34 -0
- package/src/js/mixin/class.js +7 -0
- package/src/js/mixin/container.js +17 -0
- package/src/js/mixin/event.js +5 -0
- package/src/js/mixin/i18n.js +21 -0
- package/src/js/mixin/internal/animate-fade.js +141 -0
- package/src/js/mixin/internal/animate-slide.js +163 -0
- package/src/js/mixin/internal/slideshow-animations.js +28 -0
- package/src/js/mixin/internal/slideshow-transitioner.js +73 -0
- package/src/js/mixin/media.js +53 -0
- package/src/js/mixin/modal.js +313 -0
- package/src/js/mixin/parallax.js +408 -0
- package/src/js/mixin/position.js +113 -0
- package/src/js/mixin/slider-autoplay.js +71 -0
- package/src/js/mixin/slider-drag.js +236 -0
- package/src/js/mixin/slider-nav.js +248 -0
- package/src/js/mixin/slider-parallax.js +147 -0
- package/src/js/mixin/slider-reactive.js +19 -0
- package/src/js/mixin/slider.js +228 -0
- package/src/js/mixin/slideshow.js +46 -0
- package/src/js/mixin/svg.js +121 -0
- package/src/js/mixin/togglable.js +258 -0
- package/src/js/uikit-core.js +11 -0
- package/src/js/uikit.js +7 -0
- package/src/js/util/animation.js +122 -0
- package/src/js/util/attr.js +42 -0
- package/src/js/util/await.js +7 -0
- package/src/js/util/class.js +53 -0
- package/src/js/util/dimensions.js +220 -0
- package/src/js/util/dom.js +118 -0
- package/src/js/util/env.js +12 -0
- package/src/js/util/event.js +142 -0
- package/src/js/util/fastdom.js +62 -0
- package/src/js/util/filter.js +91 -0
- package/src/js/util/index.js +17 -0
- package/src/js/util/keys.js +11 -0
- package/src/js/util/lang.js +280 -0
- package/src/js/util/mouse.js +80 -0
- package/src/js/util/observer.js +49 -0
- package/src/js/util/player.js +98 -0
- package/src/js/util/position.js +235 -0
- package/src/js/util/scroll.js +64 -0
- package/src/js/util/selector.js +143 -0
- package/src/js/util/style.js +96 -0
- package/src/js/util/svg.js +10 -0
- package/src/js/util/viewport.js +251 -0
- package/src/less/components/_import.less +96 -0
- package/src/less/components/accordion.less +122 -0
- package/src/less/components/alert.less +146 -0
- package/src/less/components/align.less +142 -0
- package/src/less/components/animation.less +283 -0
- package/src/less/components/article.less +110 -0
- package/src/less/components/background.less +140 -0
- package/src/less/components/badge.less +90 -0
- package/src/less/components/base.less +740 -0
- package/src/less/components/breadcrumb.less +157 -0
- package/src/less/components/button.less +540 -0
- package/src/less/components/card.less +441 -0
- package/src/less/components/close.less +67 -0
- package/src/less/components/column.less +143 -0
- package/src/less/components/comment.less +160 -0
- package/src/less/components/container.less +185 -0
- package/src/less/components/countdown.less +112 -0
- package/src/less/components/cover.less +76 -0
- package/src/less/components/description-list.less +71 -0
- package/src/less/components/divider.less +176 -0
- package/src/less/components/dotnav.less +177 -0
- package/src/less/components/drop.less +78 -0
- package/src/less/components/dropbar.less +131 -0
- package/src/less/components/dropdown.less +213 -0
- package/src/less/components/dropnav.less +43 -0
- package/src/less/components/flex.less +308 -0
- package/src/less/components/form-range.less +191 -0
- package/src/less/components/form.less +930 -0
- package/src/less/components/grid.less +419 -0
- package/src/less/components/heading.less +289 -0
- package/src/less/components/height.less +57 -0
- package/src/less/components/icon.less +313 -0
- package/src/less/components/iconnav.less +163 -0
- package/src/less/components/inverse.less +64 -0
- package/src/less/components/label.less +110 -0
- package/src/less/components/leader.less +75 -0
- package/src/less/components/lightbox.less +215 -0
- package/src/less/components/link.less +167 -0
- package/src/less/components/list.less +245 -0
- package/src/less/components/margin.less +263 -0
- package/src/less/components/marker.less +74 -0
- package/src/less/components/mixin.less +20 -0
- package/src/less/components/modal.less +366 -0
- package/src/less/components/nav.less +755 -0
- package/src/less/components/navbar.less +681 -0
- package/src/less/components/notification.less +191 -0
- package/src/less/components/offcanvas.less +329 -0
- package/src/less/components/overlay.less +92 -0
- package/src/less/components/padding.less +81 -0
- package/src/less/components/pagination.less +159 -0
- package/src/less/components/placeholder.less +45 -0
- package/src/less/components/position.less +241 -0
- package/src/less/components/print.less +61 -0
- package/src/less/components/progress.less +83 -0
- package/src/less/components/search.less +488 -0
- package/src/less/components/section.less +257 -0
- package/src/less/components/slidenav.less +137 -0
- package/src/less/components/slider.less +123 -0
- package/src/less/components/slideshow.less +93 -0
- package/src/less/components/sortable.less +90 -0
- package/src/less/components/spinner.less +74 -0
- package/src/less/components/sticky.less +65 -0
- package/src/less/components/subnav.less +317 -0
- package/src/less/components/svg.less +36 -0
- package/src/less/components/switcher.less +47 -0
- package/src/less/components/tab.less +222 -0
- package/src/less/components/table.less +352 -0
- package/src/less/components/text.less +296 -0
- package/src/less/components/thumbnav.less +133 -0
- package/src/less/components/tile.less +247 -0
- package/src/less/components/tooltip.less +79 -0
- package/src/less/components/totop.less +86 -0
- package/src/less/components/transition.less +172 -0
- package/src/less/components/utility.less +584 -0
- package/src/less/components/variables.less +123 -0
- package/src/less/components/visibility.less +164 -0
- package/src/less/components/width.less +489 -0
- package/src/less/theme/_import.less +82 -0
- package/src/less/theme/accordion.less +82 -0
- package/src/less/theme/alert.less +76 -0
- package/src/less/theme/align.less +14 -0
- package/src/less/theme/animation.less +14 -0
- package/src/less/theme/article.less +60 -0
- package/src/less/theme/background.less +14 -0
- package/src/less/theme/badge.less +29 -0
- package/src/less/theme/base.less +134 -0
- package/src/less/theme/breadcrumb.less +45 -0
- package/src/less/theme/button.less +212 -0
- package/src/less/theme/card.less +236 -0
- package/src/less/theme/close.less +32 -0
- package/src/less/theme/column.less +14 -0
- package/src/less/theme/comment.less +72 -0
- package/src/less/theme/container.less +14 -0
- package/src/less/theme/countdown.less +53 -0
- package/src/less/theme/description-list.less +36 -0
- package/src/less/theme/divider.less +49 -0
- package/src/less/theme/dotnav.less +57 -0
- package/src/less/theme/drop.less +14 -0
- package/src/less/theme/dropbar.less +44 -0
- package/src/less/theme/dropdown.less +59 -0
- package/src/less/theme/form-range.less +57 -0
- package/src/less/theme/form.less +154 -0
- package/src/less/theme/grid.less +28 -0
- package/src/less/theme/heading.less +71 -0
- package/src/less/theme/height.less +14 -0
- package/src/less/theme/icon.less +67 -0
- package/src/less/theme/iconnav.less +44 -0
- package/src/less/theme/inverse.less +14 -0
- package/src/less/theme/label.less +46 -0
- package/src/less/theme/leader.less +26 -0
- package/src/less/theme/lightbox.less +32 -0
- package/src/less/theme/link.less +55 -0
- package/src/less/theme/list.less +50 -0
- package/src/less/theme/margin.less +14 -0
- package/src/less/theme/marker.less +31 -0
- package/src/less/theme/modal.less +102 -0
- package/src/less/theme/nav.less +142 -0
- package/src/less/theme/navbar.less +179 -0
- package/src/less/theme/notification.less +44 -0
- package/src/less/theme/offcanvas.less +32 -0
- package/src/less/theme/overlay.less +33 -0
- package/src/less/theme/padding.less +14 -0
- package/src/less/theme/pagination.less +41 -0
- package/src/less/theme/placeholder.less +29 -0
- package/src/less/theme/position.less +14 -0
- package/src/less/theme/progress.less +27 -0
- package/src/less/theme/search.less +121 -0
- package/src/less/theme/section.less +32 -0
- package/src/less/theme/slidenav.less +52 -0
- package/src/less/theme/slider.less +14 -0
- package/src/less/theme/sortable.less +38 -0
- package/src/less/theme/spinner.less +14 -0
- package/src/less/theme/sticky.less +14 -0
- package/src/less/theme/subnav.less +79 -0
- package/src/less/theme/tab.less +138 -0
- package/src/less/theme/table.less +86 -0
- package/src/less/theme/text.less +61 -0
- package/src/less/theme/thumbnav.less +65 -0
- package/src/less/theme/tile.less +52 -0
- package/src/less/theme/tooltip.less +20 -0
- package/src/less/theme/totop.less +32 -0
- package/src/less/theme/transition.less +14 -0
- package/src/less/theme/utility.less +52 -0
- package/src/less/theme/variables.less +36 -0
- package/src/less/theme/width.less +14 -0
- package/src/less/uikit.less +5 -0
- package/src/less/uikit.theme.less +11 -0
- package/src/scss/components/_import.scss +96 -0
- package/src/scss/components/accordion.scss +100 -0
- package/src/scss/components/alert.scss +133 -0
- package/src/scss/components/align.scss +141 -0
- package/src/scss/components/animation.scss +278 -0
- package/src/scss/components/article.scss +93 -0
- package/src/scss/components/background.scss +138 -0
- package/src/scss/components/badge.scss +71 -0
- package/src/scss/components/base.scss +561 -0
- package/src/scss/components/breadcrumb.scss +115 -0
- package/src/scss/components/button.scss +374 -0
- package/src/scss/components/card.scss +379 -0
- package/src/scss/components/close.scss +53 -0
- package/src/scss/components/column.scss +136 -0
- package/src/scss/components/comment.scss +153 -0
- package/src/scss/components/container.scss +180 -0
- package/src/scss/components/countdown.scss +93 -0
- package/src/scss/components/cover.scss +78 -0
- package/src/scss/components/description-list.scss +68 -0
- package/src/scss/components/divider.scss +137 -0
- package/src/scss/components/dotnav.scss +144 -0
- package/src/scss/components/drop.scss +75 -0
- package/src/scss/components/dropbar.scss +123 -0
- package/src/scss/components/dropdown.scss +192 -0
- package/src/scss/components/dropnav.scss +44 -0
- package/src/scss/components/flex.scss +310 -0
- package/src/scss/components/form-range.scss +147 -0
- package/src/scss/components/form.scss +771 -0
- package/src/scss/components/grid.scss +394 -0
- package/src/scss/components/heading.scss +227 -0
- package/src/scss/components/height.scss +56 -0
- package/src/scss/components/icon.scss +228 -0
- package/src/scss/components/iconnav.scss +140 -0
- package/src/scss/components/inverse.scss +51 -0
- package/src/scss/components/label.scss +90 -0
- package/src/scss/components/leader.scss +69 -0
- package/src/scss/components/lightbox.scss +205 -0
- package/src/scss/components/link.scss +131 -0
- package/src/scss/components/list.scss +199 -0
- package/src/scss/components/margin.scss +257 -0
- package/src/scss/components/marker.scss +56 -0
- package/src/scss/components/mixin.scss +34 -0
- package/src/scss/components/modal.scss +336 -0
- package/src/scss/components/nav.scss +533 -0
- package/src/scss/components/navbar.scss +579 -0
- package/src/scss/components/notification.scss +178 -0
- package/src/scss/components/offcanvas.scss +318 -0
- package/src/scss/components/overlay.scss +88 -0
- package/src/scss/components/padding.scss +78 -0
- package/src/scss/components/pagination.scss +127 -0
- package/src/scss/components/placeholder.scss +43 -0
- package/src/scss/components/position.scss +240 -0
- package/src/scss/components/print.scss +63 -0
- package/src/scss/components/progress.scss +81 -0
- package/src/scss/components/search.scss +367 -0
- package/src/scss/components/section.scss +243 -0
- package/src/scss/components/slidenav.scss +112 -0
- package/src/scss/components/slider.scss +121 -0
- package/src/scss/components/slideshow.scss +95 -0
- package/src/scss/components/sortable.scss +89 -0
- package/src/scss/components/spinner.scss +73 -0
- package/src/scss/components/sticky.scss +64 -0
- package/src/scss/components/subnav.scss +222 -0
- package/src/scss/components/svg.scss +38 -0
- package/src/scss/components/switcher.scss +49 -0
- package/src/scss/components/tab.scss +186 -0
- package/src/scss/components/table.scss +293 -0
- package/src/scss/components/text.scss +256 -0
- package/src/scss/components/thumbnav.scss +119 -0
- package/src/scss/components/tile.scss +230 -0
- package/src/scss/components/tooltip.scss +72 -0
- package/src/scss/components/totop.scss +64 -0
- package/src/scss/components/transition.scss +169 -0
- package/src/scss/components/utility.scss +545 -0
- package/src/scss/components/variables.scss +84 -0
- package/src/scss/components/visibility.scss +166 -0
- package/src/scss/components/width.scss +487 -0
- package/src/scss/mixins-theme.scss +2298 -0
- package/src/scss/mixins.scss +1896 -0
- package/src/scss/uikit-theme.scss +8 -0
- package/src/scss/uikit.scss +5 -0
- package/src/scss/variables-theme.scss +1325 -0
- package/src/scss/variables.scss +1190 -0
- package/tests/accordion.html +214 -0
- package/tests/alert.html +124 -0
- package/tests/align.html +133 -0
- package/tests/animation.html +252 -0
- package/tests/article.html +167 -0
- package/tests/background.html +67 -0
- package/tests/badge.html +93 -0
- package/tests/base.html +244 -0
- package/tests/breadcrumb.html +64 -0
- package/tests/button.html +257 -0
- package/tests/card.html +630 -0
- package/tests/close.html +74 -0
- package/tests/column.html +71 -0
- package/tests/comment.html +209 -0
- package/tests/container.html +266 -0
- package/tests/countdown.html +716 -0
- package/tests/cover.html +167 -0
- package/tests/description-list.html +51 -0
- package/tests/divider.html +89 -0
- package/tests/dotnav.html +139 -0
- package/tests/drop.html +782 -0
- package/tests/dropbar.html +551 -0
- package/tests/dropdown.html +286 -0
- package/tests/dropnav.html +856 -0
- package/tests/filter.html +287 -0
- package/tests/flex.html +182 -0
- package/tests/form.html +675 -0
- package/tests/grid-masonry.html +80 -0
- package/tests/grid-parallax.html +171 -0
- package/tests/grid.html +679 -0
- package/tests/heading.html +337 -0
- package/tests/height-expand.html +32 -0
- package/tests/height-viewport.html +253 -0
- package/tests/height.html +160 -0
- package/tests/icon.html +907 -0
- package/tests/iconnav.html +40 -0
- package/tests/image.html +642 -0
- package/tests/images/avatar.jpg +0 -0
- package/tests/images/dark.jpg +0 -0
- package/tests/images/icons.svg +24 -0
- package/tests/images/image-type.avif +0 -0
- package/tests/images/image-type.jpeg +0 -0
- package/tests/images/image-type.webp +0 -0
- package/tests/images/light.jpg +0 -0
- package/tests/images/photo.jpg +0 -0
- package/tests/images/photo2.jpg +0 -0
- package/tests/images/photo3.jpg +0 -0
- package/tests/images/size-h.jpg +0 -0
- package/tests/images/size-v.jpg +0 -0
- package/tests/images/size1.jpg +0 -0
- package/tests/images/size2.jpg +0 -0
- package/tests/images/slider1.jpg +0 -0
- package/tests/images/slider2.jpg +0 -0
- package/tests/images/slider3.jpg +0 -0
- package/tests/images/slider4.jpg +0 -0
- package/tests/images/slider5.jpg +0 -0
- package/tests/index.html +905 -0
- package/tests/js/index.js +171 -0
- package/tests/label.html +28 -0
- package/tests/leader.html +67 -0
- package/tests/lightbox.html +689 -0
- package/tests/link.html +121 -0
- package/tests/list.html +490 -0
- package/tests/margin.html +208 -0
- package/tests/marker.html +87 -0
- package/tests/modal.html +497 -0
- package/tests/nav.html +487 -0
- package/tests/navbar.html +2746 -0
- package/tests/notification.html +137 -0
- package/tests/offcanvas.html +780 -0
- package/tests/overlay.html +102 -0
- package/tests/padding.html +52 -0
- package/tests/pagination.html +140 -0
- package/tests/parallax.html +298 -0
- package/tests/placeholder.html +33 -0
- package/tests/position.html +436 -0
- package/tests/progress.html +59 -0
- package/tests/scroll.html +118 -0
- package/tests/scrollspy.html +593 -0
- package/tests/search.html +535 -0
- package/tests/section.html +384 -0
- package/tests/slidenav.html +333 -0
- package/tests/slider.html +661 -0
- package/tests/slideshow.html +565 -0
- package/tests/sortable.html +300 -0
- package/tests/spinner.html +25 -0
- package/tests/sticky-navbar.html +1421 -0
- package/tests/sticky-parallax.html +279 -0
- package/tests/sticky.html +429 -0
- package/tests/subnav.html +282 -0
- package/tests/svg.html +78 -0
- package/tests/switcher.html +394 -0
- package/tests/tab.html +266 -0
- package/tests/table.html +329 -0
- package/tests/text.html +155 -0
- package/tests/thumbnav.html +64 -0
- package/tests/tile.html +226 -0
- package/tests/toggle.html +186 -0
- package/tests/tooltip.html +126 -0
- package/tests/totop.html +68 -0
- package/tests/transition.html +246 -0
- package/tests/upload.html +290 -0
- package/tests/utility.html +644 -0
- package/tests/video.html +206 -0
- package/tests/visibility.html +112 -0
- package/tests/width.html +130 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/*! UIkit 3.24.2 | https://www.getuikit.com | (c) 2014 - 2025 YOOtheme | MIT License */(function(i,b){typeof exports=="object"&&typeof module<"u"?module.exports=b(require("uikit-util")):typeof define=="function"&&define.amd?define("uikitparallax",["uikit-util"],b):(i=typeof globalThis<"u"?globalThis:i||self,i.UIkitParallax=b(i.UIkit.util))})(this,function(i){"use strict";function b(n,e="update"){n._connected&&n._updates.length&&(n._updateCount||(n._updateCount=0,requestAnimationFrame(()=>n._updateCount=0)),n._queued||(n._queued=new Set,i.fastdom.read(()=>{n._connected&&Y(n,n._queued),n._queued=null})),n._updateCount++<20&&n._queued.add(e.type||e))}function Y(n,e){for(const{read:t,write:r,events:o=[]}of n._updates){if(!e.has("update")&&!o.some(c=>e.has(c)))continue;let s;t&&(s=t.call(n,n._data,e),s&&i.isPlainObject(s)&&i.assign(n._data,s)),r&&s!==!1&&i.fastdom.write(()=>{n._connected&&r.call(n,n._data,e)})}}function Z(n){return F(i.observeResize,n,"resize")}function k(n){return F((e,t)=>i.observeViewportResize(t),n,"resize")}function U(n){return F((e,t)=>({disconnect:i.on(nn(e),"scroll",t,{passive:!0})}),n,"scroll")}function F(n,e,t){return{observe:n,handler(){b(this,t)},...e}}function nn(n){return i.toNodes(n).map(e=>{const{ownerDocument:t}=e,r=i.scrollParent(e,!0);return r===t.scrollingElement?t:r})}var en={props:{media:Boolean},data:{media:!1},connected(){const n=tn(this.media,this.$el);if(this.matchMedia=!0,n){this.mediaObj=window.matchMedia(n);const e=()=>{this.matchMedia=this.mediaObj.matches,i.trigger(this.$el,i.createEvent("mediachange",!1,!0,[this.mediaObj]))};this.offMediaObj=i.on(this.mediaObj,"change",()=>{e(),this.$emit("resize")}),e()}},disconnected(){var n;(n=this.offMediaObj)==null||n.call(this)}};function tn(n,e){if(i.isString(n)){if(i.startsWith(n,"@"))n=i.toFloat(i.css(e,`--uk-breakpoint-${n.slice(1)}`));else if(isNaN(n))return n}return n&&i.isNumeric(n)?`(min-width: ${n}px)`:""}function rn(n,e){var t;return(t=n==null?void 0:n.startsWith)==null?void 0:t.call(n,e)}const{from:on}=Array;function sn(n){return typeof n=="function"}function M(n){return n!==null&&typeof n=="object"}function cn(n){return M(n)&&n===n.window}function an(n){return z(n)===9}function I(n){return z(n)>=1}function z(n){return!cn(n)&&M(n)&&n.nodeType}function P(n){return typeof n=="string"}function fn(n){return n===void 0}function x(n){return n&&l(n)[0]}function l(n){return I(n)?[n]:Array.from(n||[]).filter(I)}function A(n){const e=Object.create(null);return(t,...r)=>e[t]||(e[t]=n(t,...r))}function C(n,e,t){var r;if(M(e)){for(const o in e)C(n,o,e[o]);return}if(fn(t))return(r=x(n))==null?void 0:r.getAttribute(e);for(const o of l(n))sn(t)&&(t=t.call(o,C(o,e))),t===null?un(o,e):o.setAttribute(e,t)}function un(n,e){l(n).forEach(t=>t.removeAttribute(e))}const dn=typeof window<"u"&&Element.prototype.checkVisibility||function(){return this.offsetWidth||this.offsetHeight||this.getClientRects().length};function ln(n){return l(n).some(e=>dn.call(e))}function hn(n){var e;return(e=x(n))==null?void 0:e.parentElement}function gn(n,e){return l(n).filter(t=>T(t,e))}function T(n,e){return l(n).some(t=>t.matches(e))}function mn(n,e){n=x(n);const t=n?on(n.children):[];return e?gn(t,e):t}function W(n,e){return mn(hn(n)).indexOf(n)}function bn(n,e){return l(vn(n,x(e),"querySelectorAll"))}const pn=/([!>+~-])(?=\s+[!>+~-]|\s*$)/g,$n=/(\([^)]*\)|[^,])+/g,wn=A(n=>{let e=!1;if(!n||!P(n))return{};const t=[];for(let r of n.match($n))r=r.trim().replace(pn,"$1 *"),e||(e=["!","+","~","-",">"].includes(r[0])),t.push(r);return{selector:t.join(","),selectors:t,isContextSelector:e}}),xn=/(\([^)]*\)|\S)*/,R=A(n=>{n=n.slice(1).trim();const[e]=n.match(xn);return[e,n.slice(e.length+1)]});function vn(n,e=document,t){var r;const o=wn(n);if(!o.isContextSelector)return o.selector?O(e,t,o.selector):n;n="";const s=o.selectors.length===1;for(let c of o.selectors){let a,f=e;if(c[0]==="!"&&([a,c]=R(c),f=(r=e.parentElement)==null?void 0:r.closest(a),!c&&s)||f&&c[0]==="-"&&([a,c]=R(c),f=f.previousElementSibling,f=T(f,a)?f:null,!c&&s))return f;if(f){if(s)return c[0]==="~"||c[0]==="+"?(c=`:scope > :nth-child(${W(f)+1}) ${c}`,f=f.parentElement):c[0]===">"&&(c=`:scope ${c}`),O(f,t,c);n+=`${n?",":""}${yn(f)} ${c}`}}return an(e)||(e=e.ownerDocument),O(e,t,n)}function O(n,e,t){try{return n[e](t)}catch{return null}}function yn(n){const e=[];for(;n.parentNode;){const t=C(n,"id");if(t){e.unshift(`#${Sn(t)}`);break}else{let{tagName:r}=n;r!=="HTML"&&(r+=`:nth-child(${W(n)+1})`),e.unshift(r),n=n.parentNode}}return e.join(" > ")}function Sn(n){return P(n)?CSS.escape(n):""}const _n=/^<(\w+)\s*\/?>(?:<\/\1>)?$/;function Fn(n){const e=_n.exec(n);if(e)return document.createElement(e[1]);const t=document.createElement("template");return t.innerHTML=n.trim(),Mn(t.content.childNodes)}function Mn(n){return n.length>1?n:n[0]}function Pn(n,e){return Cn(n)?l(Fn(n)):bn(n,e)}function Cn(n){return P(n)&&rn(n.trim(),"<")}function On(n){return ln(n)?Math.ceil(Math.max(0,...Pn("[stroke]",n).map(e=>{var t;return((t=e.getTotalLength)==null?void 0:t.call(e))||0}))):0}const v={x:y,y,rotate:y,scale:y,color:j,backgroundColor:j,borderColor:j,blur:g,hue:g,fopacity:g,grayscale:g,invert:g,saturate:g,sepia:g,opacity:Nn,stroke:In,bgx:D,bgy:D},{keys:q}=Object;var jn={mixins:[en],props:Q(q(v),"list"),data:Q(q(v),void 0),computed:{props(n,e){const t={};for(const o in n)o in v&&!i.isUndefined(n[o])&&(t[o]=n[o].slice());const r={};for(const o in t)r[o]=v[o](o,e,t[o],t);return r}},events:{load(){this.$emit()}},methods:{reset(){i.resetProps(this.$el,this.getCss(0))},getCss(n){const e={};for(const t in this.props)this.props[t](e,i.clamp(n));return e.willChange=Object.keys(e).map(i.propName).join(","),e}}};function y(n,e,t){let r=_(t)||{x:"px",y:"px",rotate:"deg"}[n]||"",o;return n==="x"||n==="y"?(n=`translate${i.ucfirst(n)}`,o=s=>i.toFloat(i.toFloat(s).toFixed(r==="px"?0:6))):n==="scale"&&(r="",o=s=>{var c;return _([s])?i.toPx(s,"width",e,!0)/e[`offset${(c=s.endsWith)!=null&&c.call(s,"vh")?"Height":"Width"}`]:i.toFloat(s)}),t.length===1&&t.unshift(n==="scale"?1:0),t=m(t,o),(s,c)=>{s.transform=`${s.transform||""} ${n}(${p(t,c)}${r})`}}function j(n,e,t){return t.length===1&&t.unshift($(e,n,"")),t=m(t,r=>En(e,r)),(r,o)=>{const[s,c,a]=L(t,o),f=s.map((h,u)=>(h+=a*(c[u]-h),u===3?i.toFloat(h):parseInt(h,10))).join(",");r[n]=`rgba(${f})`}}function En(n,e){return $(n,"color",e).split(/[(),]/g).slice(1,-1).concat(1).slice(0,4).map(i.toFloat)}function g(n,e,t){t.length===1&&t.unshift(0);const r=_(t)||{blur:"px",hue:"deg"}[n]||"%";return n={fopacity:"opacity",hue:"hue-rotate"}[n]||n,t=m(t),(o,s)=>{const c=p(t,s);o.filter=`${o.filter||""} ${n}(${c+r})`}}function Nn(n,e,t){return t.length===1&&t.unshift($(e,n,"")),t=m(t),(r,o)=>{r[n]=p(t,o)}}function In(n,e,t){t.length===1&&t.unshift(0);const r=_(t),o=On(e);return t=m(t.reverse(),s=>(s=i.toFloat(s),r==="%"?s*o/100:s)),t.some(([s])=>s)?(i.css(e,"strokeDasharray",o),(s,c)=>{s.strokeDashoffset=p(t,c)}):i.noop}function D(n,e,t,r){t.length===1&&t.unshift(0);const o=n==="bgy"?"height":"width";r[n]=m(t,a=>i.toPx(a,o,e));const s=["bgx","bgy"].filter(a=>a in r);if(s.length===2&&n==="bgx")return i.noop;if($(e,"backgroundSize","")==="cover")return zn(n,e,t,r);const c={};for(const a of s)c[a]=H(e,a);return V(s,c,r)}function zn(n,e,t,r){const o=An(e);if(!o.width)return i.noop;const s={width:e.offsetWidth,height:e.offsetHeight},c=["bgx","bgy"].filter(u=>u in r),a={};for(const u of c){const d=r[u].map(([Rn])=>Rn),w=Math.min(...d),N=Math.max(...d),K=d.indexOf(w)<d.indexOf(N),X=N-w;a[u]=`${(K?-X:0)-(K?w:N)}px`,s[u==="bgy"?"height":"width"]+=X}const f=i.Dimensions.cover(o,s);for(const u of c){const d=u==="bgy"?"height":"width",w=f[d]-s[d];a[u]=`max(${H(e,u)},-${w}px) + ${a[u]}`}const h=V(c,a,r);return(u,d)=>{h(u,d),u.backgroundSize=`${f.width}px ${f.height}px`,u.backgroundRepeat="no-repeat"}}function H(n,e){return $(n,`background-position-${e.slice(-1)}`,"")}function V(n,e,t){return function(r,o){for(const s of n){const c=p(t[s],o);r[`background-position-${s.slice(-1)}`]=`calc(${e[s]} + ${c}px)`}}}const B={},S={};function An(n){const e=i.css(n,"backgroundImage").replace(/^none|url\(["']?(.+?)["']?\)$/,"$1");if(S[e])return S[e];const t=new Image;return e&&(t.src=e,!t.naturalWidth&&!B[e])?(i.once(t,"error load",()=>{S[e]=E(t),i.trigger(n,i.createEvent("load",!1))}),B[e]=!0,E(t)):S[e]=E(t)}function E(n){return{width:n.naturalWidth,height:n.naturalHeight}}function m(n,e=i.toFloat){const t=[],{length:r}=n;let o=0;for(let s=0;s<r;s++){let[c,a]=i.isString(n[s])?n[s].trim().split(/ (?![^(]*\))/):[n[s]];if(c=e(c),a=a?i.toFloat(a)/100:null,s===0?a===null?a=0:a&&t.push([c,0]):s===r-1&&(a===null?a=1:a!==1&&(t.push([c,a]),a=1)),t.push([c,a]),a===null)o++;else if(o){const f=t[s-o-1][1],h=(a-f)/(o+1);for(let u=o;u>0;u--)t[s-u][1]=f+h*(o-u+1);o=0}}return t}function L(n,e){const t=i.findIndex(n.slice(1),([,r])=>e<=r)+1;return[n[t-1][0],n[t][0],(e-n[t-1][1])/(n[t][1]-n[t-1][1])]}function p(n,e){const[t,r,o]=L(n,e);return t+Math.abs(t-r)*o*(t<r?1:-1)}const Tn=/^-?\d+(?:\.\d+)?(\S+)?/;function _(n,e){var t;for(const r of n){const o=(t=r.match)==null?void 0:t.call(r,Tn);if(o)return o[1]}return e}function $(n,e,t){const r=n.style[e],o=i.css(i.css(n,e,t),e);return n.style[e]=r,o}function Q(n,e){return n.reduce((t,r)=>(t[r]=e,t),{})}function Wn(n,e){return e>=0?Math.pow(n,e+1):1-Math.pow(1-n,1-e)}var G={mixins:[jn],props:{target:String,viewport:Number,easing:Number,start:String,end:String},data:{target:!1,viewport:1,easing:1,start:0,end:0},computed:{target:({target:n},e)=>J(n&&i.query(n,e)||e),start({start:n}){return i.toPx(n,"height",this.target,!0)},end({end:n,viewport:e}){return i.toPx(n||(e=(1-e)*100)&&`${e}vh+${e}%`,"height",this.target,!0)}},observe:[k(),U({target:({target:n})=>n}),Z({target:({$el:n,target:e})=>[n,e,i.scrollParent(e,!0)]})],update:{read({percent:n},e){if(e.has("scroll")||(n=!1),!i.isVisible(this.$el))return!1;if(!this.matchMedia)return;const t=n;return n=Wn(i.scrolledOver(this.target,this.start,this.end),this.easing),{percent:n,style:t===n?!1:this.getCss(n)}},write({style:n}){if(!this.matchMedia){this.reset();return}n&&i.css(this.$el,n)},events:["scroll","resize"]}};function J(n){return n?"offsetTop"in n?n:J(i.parent(n)):document.documentElement}return typeof window<"u"&&window.UIkit&&window.UIkit.component("parallax",G),G});
|
|
@@ -0,0 +1,637 @@
|
|
|
1
|
+
/*! UIkit 3.24.2 | https://www.getuikit.com | (c) 2014 - 2025 YOOtheme | MIT License */
|
|
2
|
+
|
|
3
|
+
(function (global, factory) {
|
|
4
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('uikit-util')) :
|
|
5
|
+
typeof define === 'function' && define.amd ? define('uikitslider_parallax', ['uikit-util'], factory) :
|
|
6
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.UIkitSlider_parallax = factory(global.UIkit.util));
|
|
7
|
+
})(this, (function (uikitUtil) { 'use strict';
|
|
8
|
+
|
|
9
|
+
var Media = {
|
|
10
|
+
props: {
|
|
11
|
+
media: Boolean
|
|
12
|
+
},
|
|
13
|
+
data: {
|
|
14
|
+
media: false
|
|
15
|
+
},
|
|
16
|
+
connected() {
|
|
17
|
+
const media = toMedia(this.media, this.$el);
|
|
18
|
+
this.matchMedia = true;
|
|
19
|
+
if (media) {
|
|
20
|
+
this.mediaObj = window.matchMedia(media);
|
|
21
|
+
const handler = () => {
|
|
22
|
+
this.matchMedia = this.mediaObj.matches;
|
|
23
|
+
uikitUtil.trigger(this.$el, uikitUtil.createEvent("mediachange", false, true, [this.mediaObj]));
|
|
24
|
+
};
|
|
25
|
+
this.offMediaObj = uikitUtil.on(this.mediaObj, "change", () => {
|
|
26
|
+
handler();
|
|
27
|
+
this.$emit("resize");
|
|
28
|
+
});
|
|
29
|
+
handler();
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
disconnected() {
|
|
33
|
+
var _a;
|
|
34
|
+
(_a = this.offMediaObj) == null ? void 0 : _a.call(this);
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
function toMedia(value, element) {
|
|
38
|
+
if (uikitUtil.isString(value)) {
|
|
39
|
+
if (uikitUtil.startsWith(value, "@")) {
|
|
40
|
+
value = uikitUtil.toFloat(uikitUtil.css(element, `--uk-breakpoint-${value.slice(1)}`));
|
|
41
|
+
} else if (isNaN(value)) {
|
|
42
|
+
return value;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
return value && uikitUtil.isNumeric(value) ? `(min-width: ${value}px)` : "";
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
function startsWith(str, search) {
|
|
49
|
+
var _a;
|
|
50
|
+
return (_a = str == null ? void 0 : str.startsWith) == null ? void 0 : _a.call(str, search);
|
|
51
|
+
}
|
|
52
|
+
const { from: toArray } = Array;
|
|
53
|
+
function isFunction(obj) {
|
|
54
|
+
return typeof obj === "function";
|
|
55
|
+
}
|
|
56
|
+
function isObject(obj) {
|
|
57
|
+
return obj !== null && typeof obj === "object";
|
|
58
|
+
}
|
|
59
|
+
function isWindow(obj) {
|
|
60
|
+
return isObject(obj) && obj === obj.window;
|
|
61
|
+
}
|
|
62
|
+
function isDocument(obj) {
|
|
63
|
+
return nodeType(obj) === 9;
|
|
64
|
+
}
|
|
65
|
+
function isNode(obj) {
|
|
66
|
+
return nodeType(obj) >= 1;
|
|
67
|
+
}
|
|
68
|
+
function nodeType(obj) {
|
|
69
|
+
return !isWindow(obj) && isObject(obj) && obj.nodeType;
|
|
70
|
+
}
|
|
71
|
+
function isString(value) {
|
|
72
|
+
return typeof value === "string";
|
|
73
|
+
}
|
|
74
|
+
function isUndefined(value) {
|
|
75
|
+
return value === void 0;
|
|
76
|
+
}
|
|
77
|
+
function toNode(element) {
|
|
78
|
+
return element && toNodes(element)[0];
|
|
79
|
+
}
|
|
80
|
+
function toNodes(element) {
|
|
81
|
+
return isNode(element) ? [element] : Array.from(element || []).filter(isNode);
|
|
82
|
+
}
|
|
83
|
+
function memoize(fn) {
|
|
84
|
+
const cache = /* @__PURE__ */ Object.create(null);
|
|
85
|
+
return (key, ...args) => cache[key] || (cache[key] = fn(key, ...args));
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
function attr(element, name, value) {
|
|
89
|
+
var _a;
|
|
90
|
+
if (isObject(name)) {
|
|
91
|
+
for (const key in name) {
|
|
92
|
+
attr(element, key, name[key]);
|
|
93
|
+
}
|
|
94
|
+
return;
|
|
95
|
+
}
|
|
96
|
+
if (isUndefined(value)) {
|
|
97
|
+
return (_a = toNode(element)) == null ? void 0 : _a.getAttribute(name);
|
|
98
|
+
} else {
|
|
99
|
+
for (const el of toNodes(element)) {
|
|
100
|
+
if (isFunction(value)) {
|
|
101
|
+
value = value.call(el, attr(el, name));
|
|
102
|
+
}
|
|
103
|
+
if (value === null) {
|
|
104
|
+
removeAttr(el, name);
|
|
105
|
+
} else {
|
|
106
|
+
el.setAttribute(name, value);
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
function removeAttr(element, name) {
|
|
112
|
+
toNodes(element).forEach((element2) => element2.removeAttribute(name));
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
const inBrowser = typeof window !== "undefined";
|
|
116
|
+
|
|
117
|
+
const isVisibleFn = inBrowser && Element.prototype.checkVisibility || function() {
|
|
118
|
+
return this.offsetWidth || this.offsetHeight || this.getClientRects().length;
|
|
119
|
+
};
|
|
120
|
+
function isVisible(element) {
|
|
121
|
+
return toNodes(element).some((element2) => isVisibleFn.call(element2));
|
|
122
|
+
}
|
|
123
|
+
function parent(element) {
|
|
124
|
+
var _a;
|
|
125
|
+
return (_a = toNode(element)) == null ? void 0 : _a.parentElement;
|
|
126
|
+
}
|
|
127
|
+
function filter(element, selector) {
|
|
128
|
+
return toNodes(element).filter((element2) => matches(element2, selector));
|
|
129
|
+
}
|
|
130
|
+
function matches(element, selector) {
|
|
131
|
+
return toNodes(element).some((element2) => element2.matches(selector));
|
|
132
|
+
}
|
|
133
|
+
function children(element, selector) {
|
|
134
|
+
element = toNode(element);
|
|
135
|
+
const children2 = element ? toArray(element.children) : [];
|
|
136
|
+
return selector ? filter(children2, selector) : children2;
|
|
137
|
+
}
|
|
138
|
+
function index(element, ref) {
|
|
139
|
+
return children(parent(element)).indexOf(element);
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
function findAll(selector, context) {
|
|
143
|
+
return toNodes(_query(selector, toNode(context), "querySelectorAll"));
|
|
144
|
+
}
|
|
145
|
+
const addStarRe = /([!>+~-])(?=\s+[!>+~-]|\s*$)/g;
|
|
146
|
+
const splitSelectorRe = /(\([^)]*\)|[^,])+/g;
|
|
147
|
+
const parseSelector = memoize((selector) => {
|
|
148
|
+
let isContextSelector = false;
|
|
149
|
+
if (!selector || !isString(selector)) {
|
|
150
|
+
return {};
|
|
151
|
+
}
|
|
152
|
+
const selectors = [];
|
|
153
|
+
for (let sel of selector.match(splitSelectorRe)) {
|
|
154
|
+
sel = sel.trim().replace(addStarRe, "$1 *");
|
|
155
|
+
isContextSelector || (isContextSelector = ["!", "+", "~", "-", ">"].includes(sel[0]));
|
|
156
|
+
selectors.push(sel);
|
|
157
|
+
}
|
|
158
|
+
return {
|
|
159
|
+
selector: selectors.join(","),
|
|
160
|
+
selectors,
|
|
161
|
+
isContextSelector
|
|
162
|
+
};
|
|
163
|
+
});
|
|
164
|
+
const positionRe = /(\([^)]*\)|\S)*/;
|
|
165
|
+
const parsePositionSelector = memoize((selector) => {
|
|
166
|
+
selector = selector.slice(1).trim();
|
|
167
|
+
const [position] = selector.match(positionRe);
|
|
168
|
+
return [position, selector.slice(position.length + 1)];
|
|
169
|
+
});
|
|
170
|
+
function _query(selector, context = document, queryFn) {
|
|
171
|
+
var _a;
|
|
172
|
+
const parsed = parseSelector(selector);
|
|
173
|
+
if (!parsed.isContextSelector) {
|
|
174
|
+
return parsed.selector ? _doQuery(context, queryFn, parsed.selector) : selector;
|
|
175
|
+
}
|
|
176
|
+
selector = "";
|
|
177
|
+
const isSingle = parsed.selectors.length === 1;
|
|
178
|
+
for (let sel of parsed.selectors) {
|
|
179
|
+
let positionSel;
|
|
180
|
+
let ctx = context;
|
|
181
|
+
if (sel[0] === "!") {
|
|
182
|
+
[positionSel, sel] = parsePositionSelector(sel);
|
|
183
|
+
ctx = (_a = context.parentElement) == null ? void 0 : _a.closest(positionSel);
|
|
184
|
+
if (!sel && isSingle) {
|
|
185
|
+
return ctx;
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
if (ctx && sel[0] === "-") {
|
|
189
|
+
[positionSel, sel] = parsePositionSelector(sel);
|
|
190
|
+
ctx = ctx.previousElementSibling;
|
|
191
|
+
ctx = matches(ctx, positionSel) ? ctx : null;
|
|
192
|
+
if (!sel && isSingle) {
|
|
193
|
+
return ctx;
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
if (!ctx) {
|
|
197
|
+
continue;
|
|
198
|
+
}
|
|
199
|
+
if (isSingle) {
|
|
200
|
+
if (sel[0] === "~" || sel[0] === "+") {
|
|
201
|
+
sel = `:scope > :nth-child(${index(ctx) + 1}) ${sel}`;
|
|
202
|
+
ctx = ctx.parentElement;
|
|
203
|
+
} else if (sel[0] === ">") {
|
|
204
|
+
sel = `:scope ${sel}`;
|
|
205
|
+
}
|
|
206
|
+
return _doQuery(ctx, queryFn, sel);
|
|
207
|
+
}
|
|
208
|
+
selector += `${selector ? "," : ""}${domPath(ctx)} ${sel}`;
|
|
209
|
+
}
|
|
210
|
+
if (!isDocument(context)) {
|
|
211
|
+
context = context.ownerDocument;
|
|
212
|
+
}
|
|
213
|
+
return _doQuery(context, queryFn, selector);
|
|
214
|
+
}
|
|
215
|
+
function _doQuery(context, queryFn, selector) {
|
|
216
|
+
try {
|
|
217
|
+
return context[queryFn](selector);
|
|
218
|
+
} catch {
|
|
219
|
+
return null;
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
function domPath(element) {
|
|
223
|
+
const names = [];
|
|
224
|
+
while (element.parentNode) {
|
|
225
|
+
const id = attr(element, "id");
|
|
226
|
+
if (id) {
|
|
227
|
+
names.unshift(`#${escape(id)}`);
|
|
228
|
+
break;
|
|
229
|
+
} else {
|
|
230
|
+
let { tagName } = element;
|
|
231
|
+
if (tagName !== "HTML") {
|
|
232
|
+
tagName += `:nth-child(${index(element) + 1})`;
|
|
233
|
+
}
|
|
234
|
+
names.unshift(tagName);
|
|
235
|
+
element = element.parentNode;
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
return names.join(" > ");
|
|
239
|
+
}
|
|
240
|
+
function escape(css) {
|
|
241
|
+
return isString(css) ? CSS.escape(css) : "";
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
const singleTagRe = /^<(\w+)\s*\/?>(?:<\/\1>)?$/;
|
|
245
|
+
function fragment(html2) {
|
|
246
|
+
const matches = singleTagRe.exec(html2);
|
|
247
|
+
if (matches) {
|
|
248
|
+
return document.createElement(matches[1]);
|
|
249
|
+
}
|
|
250
|
+
const container = document.createElement("template");
|
|
251
|
+
container.innerHTML = html2.trim();
|
|
252
|
+
return unwrapSingle(container.content.childNodes);
|
|
253
|
+
}
|
|
254
|
+
function unwrapSingle(nodes) {
|
|
255
|
+
return nodes.length > 1 ? nodes : nodes[0];
|
|
256
|
+
}
|
|
257
|
+
function $$(selector, context) {
|
|
258
|
+
return isHtml(selector) ? toNodes(fragment(selector)) : findAll(selector, context);
|
|
259
|
+
}
|
|
260
|
+
function isHtml(str) {
|
|
261
|
+
return isString(str) && startsWith(str.trim(), "<");
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
function getMaxPathLength(el) {
|
|
265
|
+
return isVisible(el) ? Math.ceil(
|
|
266
|
+
Math.max(0, ...$$("[stroke]", el).map((stroke) => {
|
|
267
|
+
var _a;
|
|
268
|
+
return ((_a = stroke.getTotalLength) == null ? void 0 : _a.call(stroke)) || 0;
|
|
269
|
+
}))
|
|
270
|
+
) : 0;
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
const props = {
|
|
274
|
+
x: transformFn,
|
|
275
|
+
y: transformFn,
|
|
276
|
+
rotate: transformFn,
|
|
277
|
+
scale: transformFn,
|
|
278
|
+
color: colorFn,
|
|
279
|
+
backgroundColor: colorFn,
|
|
280
|
+
borderColor: colorFn,
|
|
281
|
+
blur: filterFn,
|
|
282
|
+
hue: filterFn,
|
|
283
|
+
fopacity: filterFn,
|
|
284
|
+
grayscale: filterFn,
|
|
285
|
+
invert: filterFn,
|
|
286
|
+
saturate: filterFn,
|
|
287
|
+
sepia: filterFn,
|
|
288
|
+
opacity: cssPropFn,
|
|
289
|
+
stroke: strokeFn,
|
|
290
|
+
bgx: backgroundFn,
|
|
291
|
+
bgy: backgroundFn
|
|
292
|
+
};
|
|
293
|
+
const { keys } = Object;
|
|
294
|
+
var Parallax = {
|
|
295
|
+
mixins: [Media],
|
|
296
|
+
props: fillObject(keys(props), "list"),
|
|
297
|
+
data: fillObject(keys(props), void 0),
|
|
298
|
+
computed: {
|
|
299
|
+
props(properties, $el) {
|
|
300
|
+
const stops = {};
|
|
301
|
+
for (const prop in properties) {
|
|
302
|
+
if (prop in props && !uikitUtil.isUndefined(properties[prop])) {
|
|
303
|
+
stops[prop] = properties[prop].slice();
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
const result = {};
|
|
307
|
+
for (const prop in stops) {
|
|
308
|
+
result[prop] = props[prop](prop, $el, stops[prop], stops);
|
|
309
|
+
}
|
|
310
|
+
return result;
|
|
311
|
+
}
|
|
312
|
+
},
|
|
313
|
+
events: {
|
|
314
|
+
load() {
|
|
315
|
+
this.$emit();
|
|
316
|
+
}
|
|
317
|
+
},
|
|
318
|
+
methods: {
|
|
319
|
+
reset() {
|
|
320
|
+
uikitUtil.resetProps(this.$el, this.getCss(0));
|
|
321
|
+
},
|
|
322
|
+
getCss(percent) {
|
|
323
|
+
const css2 = {};
|
|
324
|
+
for (const prop in this.props) {
|
|
325
|
+
this.props[prop](css2, uikitUtil.clamp(percent));
|
|
326
|
+
}
|
|
327
|
+
css2.willChange = Object.keys(css2).map(uikitUtil.propName).join(",");
|
|
328
|
+
return css2;
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
};
|
|
332
|
+
function transformFn(prop, el, stops) {
|
|
333
|
+
let unit = getUnit(stops) || { x: "px", y: "px", rotate: "deg" }[prop] || "";
|
|
334
|
+
let transformFn2;
|
|
335
|
+
if (prop === "x" || prop === "y") {
|
|
336
|
+
prop = `translate${uikitUtil.ucfirst(prop)}`;
|
|
337
|
+
transformFn2 = (stop) => uikitUtil.toFloat(uikitUtil.toFloat(stop).toFixed(unit === "px" ? 0 : 6));
|
|
338
|
+
} else if (prop === "scale") {
|
|
339
|
+
unit = "";
|
|
340
|
+
transformFn2 = (stop) => {
|
|
341
|
+
var _a;
|
|
342
|
+
return getUnit([stop]) ? uikitUtil.toPx(stop, "width", el, true) / el[`offset${((_a = stop.endsWith) == null ? void 0 : _a.call(stop, "vh")) ? "Height" : "Width"}`] : uikitUtil.toFloat(stop);
|
|
343
|
+
};
|
|
344
|
+
}
|
|
345
|
+
if (stops.length === 1) {
|
|
346
|
+
stops.unshift(prop === "scale" ? 1 : 0);
|
|
347
|
+
}
|
|
348
|
+
stops = parseStops(stops, transformFn2);
|
|
349
|
+
return (css2, percent) => {
|
|
350
|
+
css2.transform = `${css2.transform || ""} ${prop}(${getValue(stops, percent)}${unit})`;
|
|
351
|
+
};
|
|
352
|
+
}
|
|
353
|
+
function colorFn(prop, el, stops) {
|
|
354
|
+
if (stops.length === 1) {
|
|
355
|
+
stops.unshift(getCssValue(el, prop, ""));
|
|
356
|
+
}
|
|
357
|
+
stops = parseStops(stops, (stop) => parseColor(el, stop));
|
|
358
|
+
return (css2, percent) => {
|
|
359
|
+
const [start, end, p] = getStop(stops, percent);
|
|
360
|
+
const value = start.map((value2, i) => {
|
|
361
|
+
value2 += p * (end[i] - value2);
|
|
362
|
+
return i === 3 ? uikitUtil.toFloat(value2) : parseInt(value2, 10);
|
|
363
|
+
}).join(",");
|
|
364
|
+
css2[prop] = `rgba(${value})`;
|
|
365
|
+
};
|
|
366
|
+
}
|
|
367
|
+
function parseColor(el, color) {
|
|
368
|
+
return getCssValue(el, "color", color).split(/[(),]/g).slice(1, -1).concat(1).slice(0, 4).map(uikitUtil.toFloat);
|
|
369
|
+
}
|
|
370
|
+
function filterFn(prop, el, stops) {
|
|
371
|
+
if (stops.length === 1) {
|
|
372
|
+
stops.unshift(0);
|
|
373
|
+
}
|
|
374
|
+
const unit = getUnit(stops) || { blur: "px", hue: "deg" }[prop] || "%";
|
|
375
|
+
prop = { fopacity: "opacity", hue: "hue-rotate" }[prop] || prop;
|
|
376
|
+
stops = parseStops(stops);
|
|
377
|
+
return (css2, percent) => {
|
|
378
|
+
const value = getValue(stops, percent);
|
|
379
|
+
css2.filter = `${css2.filter || ""} ${prop}(${value + unit})`;
|
|
380
|
+
};
|
|
381
|
+
}
|
|
382
|
+
function cssPropFn(prop, el, stops) {
|
|
383
|
+
if (stops.length === 1) {
|
|
384
|
+
stops.unshift(getCssValue(el, prop, ""));
|
|
385
|
+
}
|
|
386
|
+
stops = parseStops(stops);
|
|
387
|
+
return (css2, percent) => {
|
|
388
|
+
css2[prop] = getValue(stops, percent);
|
|
389
|
+
};
|
|
390
|
+
}
|
|
391
|
+
function strokeFn(prop, el, stops) {
|
|
392
|
+
if (stops.length === 1) {
|
|
393
|
+
stops.unshift(0);
|
|
394
|
+
}
|
|
395
|
+
const unit = getUnit(stops);
|
|
396
|
+
const length = getMaxPathLength(el);
|
|
397
|
+
stops = parseStops(stops.reverse(), (stop) => {
|
|
398
|
+
stop = uikitUtil.toFloat(stop);
|
|
399
|
+
return unit === "%" ? stop * length / 100 : stop;
|
|
400
|
+
});
|
|
401
|
+
if (!stops.some(([value]) => value)) {
|
|
402
|
+
return uikitUtil.noop;
|
|
403
|
+
}
|
|
404
|
+
uikitUtil.css(el, "strokeDasharray", length);
|
|
405
|
+
return (css2, percent) => {
|
|
406
|
+
css2.strokeDashoffset = getValue(stops, percent);
|
|
407
|
+
};
|
|
408
|
+
}
|
|
409
|
+
function backgroundFn(prop, el, stops, props2) {
|
|
410
|
+
if (stops.length === 1) {
|
|
411
|
+
stops.unshift(0);
|
|
412
|
+
}
|
|
413
|
+
const attr = prop === "bgy" ? "height" : "width";
|
|
414
|
+
props2[prop] = parseStops(stops, (stop) => uikitUtil.toPx(stop, attr, el));
|
|
415
|
+
const bgProps = ["bgx", "bgy"].filter((prop2) => prop2 in props2);
|
|
416
|
+
if (bgProps.length === 2 && prop === "bgx") {
|
|
417
|
+
return uikitUtil.noop;
|
|
418
|
+
}
|
|
419
|
+
if (getCssValue(el, "backgroundSize", "") === "cover") {
|
|
420
|
+
return backgroundCoverFn(prop, el, stops, props2);
|
|
421
|
+
}
|
|
422
|
+
const positions = {};
|
|
423
|
+
for (const prop2 of bgProps) {
|
|
424
|
+
positions[prop2] = getBackgroundPos(el, prop2);
|
|
425
|
+
}
|
|
426
|
+
return setBackgroundPosFn(bgProps, positions, props2);
|
|
427
|
+
}
|
|
428
|
+
function backgroundCoverFn(prop, el, stops, props2) {
|
|
429
|
+
const dimImage = getBackgroundImageDimensions(el);
|
|
430
|
+
if (!dimImage.width) {
|
|
431
|
+
return uikitUtil.noop;
|
|
432
|
+
}
|
|
433
|
+
const dimEl = {
|
|
434
|
+
width: el.offsetWidth,
|
|
435
|
+
height: el.offsetHeight
|
|
436
|
+
};
|
|
437
|
+
const bgProps = ["bgx", "bgy"].filter((prop2) => prop2 in props2);
|
|
438
|
+
const positions = {};
|
|
439
|
+
for (const prop2 of bgProps) {
|
|
440
|
+
const values = props2[prop2].map(([value]) => value);
|
|
441
|
+
const min = Math.min(...values);
|
|
442
|
+
const max = Math.max(...values);
|
|
443
|
+
const down = values.indexOf(min) < values.indexOf(max);
|
|
444
|
+
const diff = max - min;
|
|
445
|
+
positions[prop2] = `${(down ? -diff : 0) - (down ? min : max)}px`;
|
|
446
|
+
dimEl[prop2 === "bgy" ? "height" : "width"] += diff;
|
|
447
|
+
}
|
|
448
|
+
const dim = uikitUtil.Dimensions.cover(dimImage, dimEl);
|
|
449
|
+
for (const prop2 of bgProps) {
|
|
450
|
+
const attr = prop2 === "bgy" ? "height" : "width";
|
|
451
|
+
const overflow = dim[attr] - dimEl[attr];
|
|
452
|
+
positions[prop2] = `max(${getBackgroundPos(el, prop2)},-${overflow}px) + ${positions[prop2]}`;
|
|
453
|
+
}
|
|
454
|
+
const fn = setBackgroundPosFn(bgProps, positions, props2);
|
|
455
|
+
return (css2, percent) => {
|
|
456
|
+
fn(css2, percent);
|
|
457
|
+
css2.backgroundSize = `${dim.width}px ${dim.height}px`;
|
|
458
|
+
css2.backgroundRepeat = "no-repeat";
|
|
459
|
+
};
|
|
460
|
+
}
|
|
461
|
+
function getBackgroundPos(el, prop) {
|
|
462
|
+
return getCssValue(el, `background-position-${prop.slice(-1)}`, "");
|
|
463
|
+
}
|
|
464
|
+
function setBackgroundPosFn(bgProps, positions, props2) {
|
|
465
|
+
return function(css2, percent) {
|
|
466
|
+
for (const prop of bgProps) {
|
|
467
|
+
const value = getValue(props2[prop], percent);
|
|
468
|
+
css2[`background-position-${prop.slice(-1)}`] = `calc(${positions[prop]} + ${value}px)`;
|
|
469
|
+
}
|
|
470
|
+
};
|
|
471
|
+
}
|
|
472
|
+
const loading = {};
|
|
473
|
+
const dimensions = {};
|
|
474
|
+
function getBackgroundImageDimensions(el) {
|
|
475
|
+
const src = uikitUtil.css(el, "backgroundImage").replace(/^none|url\(["']?(.+?)["']?\)$/, "$1");
|
|
476
|
+
if (dimensions[src]) {
|
|
477
|
+
return dimensions[src];
|
|
478
|
+
}
|
|
479
|
+
const image = new Image();
|
|
480
|
+
if (src) {
|
|
481
|
+
image.src = src;
|
|
482
|
+
if (!image.naturalWidth && !loading[src]) {
|
|
483
|
+
uikitUtil.once(image, "error load", () => {
|
|
484
|
+
dimensions[src] = toDimensions(image);
|
|
485
|
+
uikitUtil.trigger(el, uikitUtil.createEvent("load", false));
|
|
486
|
+
});
|
|
487
|
+
loading[src] = true;
|
|
488
|
+
return toDimensions(image);
|
|
489
|
+
}
|
|
490
|
+
}
|
|
491
|
+
return dimensions[src] = toDimensions(image);
|
|
492
|
+
}
|
|
493
|
+
function toDimensions(image) {
|
|
494
|
+
return {
|
|
495
|
+
width: image.naturalWidth,
|
|
496
|
+
height: image.naturalHeight
|
|
497
|
+
};
|
|
498
|
+
}
|
|
499
|
+
function parseStops(stops, fn = uikitUtil.toFloat) {
|
|
500
|
+
const result = [];
|
|
501
|
+
const { length } = stops;
|
|
502
|
+
let nullIndex = 0;
|
|
503
|
+
for (let i = 0; i < length; i++) {
|
|
504
|
+
let [value, percent] = uikitUtil.isString(stops[i]) ? stops[i].trim().split(/ (?![^(]*\))/) : [stops[i]];
|
|
505
|
+
value = fn(value);
|
|
506
|
+
percent = percent ? uikitUtil.toFloat(percent) / 100 : null;
|
|
507
|
+
if (i === 0) {
|
|
508
|
+
if (percent === null) {
|
|
509
|
+
percent = 0;
|
|
510
|
+
} else if (percent) {
|
|
511
|
+
result.push([value, 0]);
|
|
512
|
+
}
|
|
513
|
+
} else if (i === length - 1) {
|
|
514
|
+
if (percent === null) {
|
|
515
|
+
percent = 1;
|
|
516
|
+
} else if (percent !== 1) {
|
|
517
|
+
result.push([value, percent]);
|
|
518
|
+
percent = 1;
|
|
519
|
+
}
|
|
520
|
+
}
|
|
521
|
+
result.push([value, percent]);
|
|
522
|
+
if (percent === null) {
|
|
523
|
+
nullIndex++;
|
|
524
|
+
} else if (nullIndex) {
|
|
525
|
+
const leftPercent = result[i - nullIndex - 1][1];
|
|
526
|
+
const p = (percent - leftPercent) / (nullIndex + 1);
|
|
527
|
+
for (let j = nullIndex; j > 0; j--) {
|
|
528
|
+
result[i - j][1] = leftPercent + p * (nullIndex - j + 1);
|
|
529
|
+
}
|
|
530
|
+
nullIndex = 0;
|
|
531
|
+
}
|
|
532
|
+
}
|
|
533
|
+
return result;
|
|
534
|
+
}
|
|
535
|
+
function getStop(stops, percent) {
|
|
536
|
+
const index = uikitUtil.findIndex(stops.slice(1), ([, targetPercent]) => percent <= targetPercent) + 1;
|
|
537
|
+
return [
|
|
538
|
+
stops[index - 1][0],
|
|
539
|
+
stops[index][0],
|
|
540
|
+
(percent - stops[index - 1][1]) / (stops[index][1] - stops[index - 1][1])
|
|
541
|
+
];
|
|
542
|
+
}
|
|
543
|
+
function getValue(stops, percent) {
|
|
544
|
+
const [start, end, p] = getStop(stops, percent);
|
|
545
|
+
return start + Math.abs(start - end) * p * (start < end ? 1 : -1);
|
|
546
|
+
}
|
|
547
|
+
const unitRe = /^-?\d+(?:\.\d+)?(\S+)?/;
|
|
548
|
+
function getUnit(stops, defaultUnit) {
|
|
549
|
+
var _a;
|
|
550
|
+
for (const stop of stops) {
|
|
551
|
+
const match = (_a = stop.match) == null ? void 0 : _a.call(stop, unitRe);
|
|
552
|
+
if (match) {
|
|
553
|
+
return match[1];
|
|
554
|
+
}
|
|
555
|
+
}
|
|
556
|
+
return defaultUnit;
|
|
557
|
+
}
|
|
558
|
+
function getCssValue(el, prop, value) {
|
|
559
|
+
const prev = el.style[prop];
|
|
560
|
+
const val = uikitUtil.css(uikitUtil.css(el, prop, value), prop);
|
|
561
|
+
el.style[prop] = prev;
|
|
562
|
+
return val;
|
|
563
|
+
}
|
|
564
|
+
function fillObject(keys2, value) {
|
|
565
|
+
return keys2.reduce((data, prop) => {
|
|
566
|
+
data[prop] = value;
|
|
567
|
+
return data;
|
|
568
|
+
}, {});
|
|
569
|
+
}
|
|
570
|
+
|
|
571
|
+
var Component = {
|
|
572
|
+
mixins: [Parallax],
|
|
573
|
+
beforeConnect() {
|
|
574
|
+
this.item = this.$el.closest(`.${this.$options.id.replace("parallax", "items")} > *`);
|
|
575
|
+
},
|
|
576
|
+
disconnected() {
|
|
577
|
+
this.item = null;
|
|
578
|
+
},
|
|
579
|
+
events: [
|
|
580
|
+
{
|
|
581
|
+
name: "itemin itemout",
|
|
582
|
+
self: true,
|
|
583
|
+
el: ({ item }) => item,
|
|
584
|
+
handler({ type, detail: { percent, duration, timing, dir } }) {
|
|
585
|
+
uikitUtil.fastdom.read(() => {
|
|
586
|
+
if (!this.matchMedia) {
|
|
587
|
+
return;
|
|
588
|
+
}
|
|
589
|
+
const propsFrom = this.getCss(getCurrentPercent(type, dir, percent));
|
|
590
|
+
const propsTo = this.getCss(isIn(type) ? 0.5 : dir > 0 ? 1 : 0);
|
|
591
|
+
uikitUtil.fastdom.write(() => {
|
|
592
|
+
uikitUtil.css(this.$el, propsFrom);
|
|
593
|
+
uikitUtil.Transition.start(this.$el, propsTo, duration, timing).catch(uikitUtil.noop);
|
|
594
|
+
});
|
|
595
|
+
});
|
|
596
|
+
}
|
|
597
|
+
},
|
|
598
|
+
{
|
|
599
|
+
name: "transitioncanceled transitionend",
|
|
600
|
+
self: true,
|
|
601
|
+
el: ({ item }) => item,
|
|
602
|
+
handler() {
|
|
603
|
+
uikitUtil.Transition.cancel(this.$el);
|
|
604
|
+
}
|
|
605
|
+
},
|
|
606
|
+
{
|
|
607
|
+
name: "itemtranslatein itemtranslateout",
|
|
608
|
+
self: true,
|
|
609
|
+
el: ({ item }) => item,
|
|
610
|
+
handler({ type, detail: { percent, dir } }) {
|
|
611
|
+
uikitUtil.fastdom.read(() => {
|
|
612
|
+
if (!this.matchMedia) {
|
|
613
|
+
this.reset();
|
|
614
|
+
return;
|
|
615
|
+
}
|
|
616
|
+
const props = this.getCss(getCurrentPercent(type, dir, percent));
|
|
617
|
+
uikitUtil.fastdom.write(() => uikitUtil.css(this.$el, props));
|
|
618
|
+
});
|
|
619
|
+
}
|
|
620
|
+
}
|
|
621
|
+
]
|
|
622
|
+
};
|
|
623
|
+
function isIn(type) {
|
|
624
|
+
return uikitUtil.endsWith(type, "in");
|
|
625
|
+
}
|
|
626
|
+
function getCurrentPercent(type, dir, percent) {
|
|
627
|
+
percent /= 2;
|
|
628
|
+
return isIn(type) ^ dir < 0 ? percent : 1 - percent;
|
|
629
|
+
}
|
|
630
|
+
|
|
631
|
+
if (typeof window !== "undefined" && window.UIkit) {
|
|
632
|
+
window.UIkit.component("sliderParallax", Component);
|
|
633
|
+
}
|
|
634
|
+
|
|
635
|
+
return Component;
|
|
636
|
+
|
|
637
|
+
}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/*! UIkit 3.24.2 | https://www.getuikit.com | (c) 2014 - 2025 YOOtheme | MIT License */(function(i,$){typeof exports=="object"&&typeof module<"u"?module.exports=$(require("uikit-util")):typeof define=="function"&&define.amd?define("uikitslider_parallax",["uikit-util"],$):(i=typeof globalThis<"u"?globalThis:i||self,i.UIkitSlider_parallax=$(i.UIkit.util))})(this,function(i){"use strict";var $={props:{media:Boolean},data:{media:!1},connected(){const n=Y(this.media,this.$el);if(this.matchMedia=!0,n){this.mediaObj=window.matchMedia(n);const e=()=>{this.matchMedia=this.mediaObj.matches,i.trigger(this.$el,i.createEvent("mediachange",!1,!0,[this.mediaObj]))};this.offMediaObj=i.on(this.mediaObj,"change",()=>{e(),this.$emit("resize")}),e()}},disconnected(){var n;(n=this.offMediaObj)==null||n.call(this)}};function Y(n,e){if(i.isString(n)){if(i.startsWith(n,"@"))n=i.toFloat(i.css(e,`--uk-breakpoint-${n.slice(1)}`));else if(isNaN(n))return n}return n&&i.isNumeric(n)?`(min-width: ${n}px)`:""}function Z(n,e){var t;return(t=n==null?void 0:n.startsWith)==null?void 0:t.call(n,e)}const{from:k}=Array;function U(n){return typeof n=="function"}function C(n){return n!==null&&typeof n=="object"}function nn(n){return C(n)&&n===n.window}function tn(n){return N(n)===9}function E(n){return N(n)>=1}function N(n){return!nn(n)&&C(n)&&n.nodeType}function M(n){return typeof n=="string"}function en(n){return n===void 0}function w(n){return n&&l(n)[0]}function l(n){return E(n)?[n]:Array.from(n||[]).filter(E)}function T(n){const e=Object.create(null);return(t,...r)=>e[t]||(e[t]=n(t,...r))}function P(n,e,t){var r;if(C(e)){for(const o in e)P(n,o,e[o]);return}if(en(t))return(r=w(n))==null?void 0:r.getAttribute(e);for(const o of l(n))U(t)&&(t=t.call(o,P(o,e))),t===null?rn(o,e):o.setAttribute(e,t)}function rn(n,e){l(n).forEach(t=>t.removeAttribute(e))}const on=typeof window<"u"&&Element.prototype.checkVisibility||function(){return this.offsetWidth||this.offsetHeight||this.getClientRects().length};function cn(n){return l(n).some(e=>on.call(e))}function sn(n){var e;return(e=w(n))==null?void 0:e.parentElement}function an(n,e){return l(n).filter(t=>W(t,e))}function W(n,e){return l(n).some(t=>t.matches(e))}function fn(n,e){n=w(n);const t=n?k(n.children):[];return e?an(t,e):t}function A(n,e){return fn(sn(n)).indexOf(n)}function un(n,e){return l(mn(n,w(e),"querySelectorAll"))}const dn=/([!>+~-])(?=\s+[!>+~-]|\s*$)/g,ln=/(\([^)]*\)|[^,])+/g,hn=T(n=>{let e=!1;if(!n||!M(n))return{};const t=[];for(let r of n.match(ln))r=r.trim().replace(dn,"$1 *"),e||(e=["!","+","~","-",">"].includes(r[0])),t.push(r);return{selector:t.join(","),selectors:t,isContextSelector:e}}),gn=/(\([^)]*\)|\S)*/,D=T(n=>{n=n.slice(1).trim();const[e]=n.match(gn);return[e,n.slice(e.length+1)]});function mn(n,e=document,t){var r;const o=hn(n);if(!o.isContextSelector)return o.selector?O(e,t,o.selector):n;n="";const c=o.selectors.length===1;for(let s of o.selectors){let a,f=e;if(s[0]==="!"&&([a,s]=D(s),f=(r=e.parentElement)==null?void 0:r.closest(a),!s&&c)||f&&s[0]==="-"&&([a,s]=D(s),f=f.previousElementSibling,f=W(f,a)?f:null,!s&&c))return f;if(f){if(c)return s[0]==="~"||s[0]==="+"?(s=`:scope > :nth-child(${A(f)+1}) ${s}`,f=f.parentElement):s[0]===">"&&(s=`:scope ${s}`),O(f,t,s);n+=`${n?",":""}${$n(f)} ${s}`}}return tn(e)||(e=e.ownerDocument),O(e,t,n)}function O(n,e,t){try{return n[e](t)}catch{return null}}function $n(n){const e=[];for(;n.parentNode;){const t=P(n,"id");if(t){e.unshift(`#${bn(t)}`);break}else{let{tagName:r}=n;r!=="HTML"&&(r+=`:nth-child(${A(n)+1})`),e.unshift(r),n=n.parentNode}}return e.join(" > ")}function bn(n){return M(n)?CSS.escape(n):""}const pn=/^<(\w+)\s*\/?>(?:<\/\1>)?$/;function xn(n){const e=pn.exec(n);if(e)return document.createElement(e[1]);const t=document.createElement("template");return t.innerHTML=n.trim(),wn(t.content.childNodes)}function wn(n){return n.length>1?n:n[0]}function yn(n,e){return vn(n)?l(xn(n)):un(n,e)}function vn(n){return M(n)&&Z(n.trim(),"<")}function Sn(n){return cn(n)?Math.ceil(Math.max(0,...yn("[stroke]",n).map(e=>{var t;return((t=e.getTotalLength)==null?void 0:t.call(e))||0}))):0}const y={x:v,y:v,rotate:v,scale:v,color:j,backgroundColor:j,borderColor:j,blur:g,hue:g,fopacity:g,grayscale:g,invert:g,saturate:g,sepia:g,opacity:Mn,stroke:Pn,bgx:R,bgy:R},{keys:H}=Object;var Fn={mixins:[$],props:q(H(y),"list"),data:q(H(y),void 0),computed:{props(n,e){const t={};for(const o in n)o in y&&!i.isUndefined(n[o])&&(t[o]=n[o].slice());const r={};for(const o in t)r[o]=y[o](o,e,t[o],t);return r}},events:{load(){this.$emit()}},methods:{reset(){i.resetProps(this.$el,this.getCss(0))},getCss(n){const e={};for(const t in this.props)this.props[t](e,i.clamp(n));return e.willChange=Object.keys(e).map(i.propName).join(","),e}}};function v(n,e,t){let r=F(t)||{x:"px",y:"px",rotate:"deg"}[n]||"",o;return n==="x"||n==="y"?(n=`translate${i.ucfirst(n)}`,o=c=>i.toFloat(i.toFloat(c).toFixed(r==="px"?0:6))):n==="scale"&&(r="",o=c=>{var s;return F([c])?i.toPx(c,"width",e,!0)/e[`offset${(s=c.endsWith)!=null&&s.call(c,"vh")?"Height":"Width"}`]:i.toFloat(c)}),t.length===1&&t.unshift(n==="scale"?1:0),t=m(t,o),(c,s)=>{c.transform=`${c.transform||""} ${n}(${b(t,s)}${r})`}}function j(n,e,t){return t.length===1&&t.unshift(p(e,n,"")),t=m(t,r=>Cn(e,r)),(r,o)=>{const[c,s,a]=L(t,o),f=c.map((h,u)=>(h+=a*(s[u]-h),u===3?i.toFloat(h):parseInt(h,10))).join(",");r[n]=`rgba(${f})`}}function Cn(n,e){return p(n,"color",e).split(/[(),]/g).slice(1,-1).concat(1).slice(0,4).map(i.toFloat)}function g(n,e,t){t.length===1&&t.unshift(0);const r=F(t)||{blur:"px",hue:"deg"}[n]||"%";return n={fopacity:"opacity",hue:"hue-rotate"}[n]||n,t=m(t),(o,c)=>{const s=b(t,c);o.filter=`${o.filter||""} ${n}(${s+r})`}}function Mn(n,e,t){return t.length===1&&t.unshift(p(e,n,"")),t=m(t),(r,o)=>{r[n]=b(t,o)}}function Pn(n,e,t){t.length===1&&t.unshift(0);const r=F(t),o=Sn(e);return t=m(t.reverse(),c=>(c=i.toFloat(c),r==="%"?c*o/100:c)),t.some(([c])=>c)?(i.css(e,"strokeDasharray",o),(c,s)=>{c.strokeDashoffset=b(t,s)}):i.noop}function R(n,e,t,r){t.length===1&&t.unshift(0);const o=n==="bgy"?"height":"width";r[n]=m(t,a=>i.toPx(a,o,e));const c=["bgx","bgy"].filter(a=>a in r);if(c.length===2&&n==="bgx")return i.noop;if(p(e,"backgroundSize","")==="cover")return On(n,e,t,r);const s={};for(const a of c)s[a]=B(e,a);return V(c,s,r)}function On(n,e,t,r){const o=jn(e);if(!o.width)return i.noop;const c={width:e.offsetWidth,height:e.offsetHeight},s=["bgx","bgy"].filter(u=>u in r),a={};for(const u of s){const d=r[u].map(([_n])=>_n),x=Math.min(...d),_=Math.max(...d),K=d.indexOf(x)<d.indexOf(_),X=_-x;a[u]=`${(K?-X:0)-(K?x:_)}px`,c[u==="bgy"?"height":"width"]+=X}const f=i.Dimensions.cover(o,c);for(const u of s){const d=u==="bgy"?"height":"width",x=f[d]-c[d];a[u]=`max(${B(e,u)},-${x}px) + ${a[u]}`}const h=V(s,a,r);return(u,d)=>{h(u,d),u.backgroundSize=`${f.width}px ${f.height}px`,u.backgroundRepeat="no-repeat"}}function B(n,e){return p(n,`background-position-${e.slice(-1)}`,"")}function V(n,e,t){return function(r,o){for(const c of n){const s=b(t[c],o);r[`background-position-${c.slice(-1)}`]=`calc(${e[c]} + ${s}px)`}}}const z={},S={};function jn(n){const e=i.css(n,"backgroundImage").replace(/^none|url\(["']?(.+?)["']?\)$/,"$1");if(S[e])return S[e];const t=new Image;return e&&(t.src=e,!t.naturalWidth&&!z[e])?(i.once(t,"error load",()=>{S[e]=I(t),i.trigger(n,i.createEvent("load",!1))}),z[e]=!0,I(t)):S[e]=I(t)}function I(n){return{width:n.naturalWidth,height:n.naturalHeight}}function m(n,e=i.toFloat){const t=[],{length:r}=n;let o=0;for(let c=0;c<r;c++){let[s,a]=i.isString(n[c])?n[c].trim().split(/ (?![^(]*\))/):[n[c]];if(s=e(s),a=a?i.toFloat(a)/100:null,c===0?a===null?a=0:a&&t.push([s,0]):c===r-1&&(a===null?a=1:a!==1&&(t.push([s,a]),a=1)),t.push([s,a]),a===null)o++;else if(o){const f=t[c-o-1][1],h=(a-f)/(o+1);for(let u=o;u>0;u--)t[c-u][1]=f+h*(o-u+1);o=0}}return t}function L(n,e){const t=i.findIndex(n.slice(1),([,r])=>e<=r)+1;return[n[t-1][0],n[t][0],(e-n[t-1][1])/(n[t][1]-n[t-1][1])]}function b(n,e){const[t,r,o]=L(n,e);return t+Math.abs(t-r)*o*(t<r?1:-1)}const In=/^-?\d+(?:\.\d+)?(\S+)?/;function F(n,e){var t;for(const r of n){const o=(t=r.match)==null?void 0:t.call(r,In);if(o)return o[1]}return e}function p(n,e,t){const r=n.style[e],o=i.css(i.css(n,e,t),e);return n.style[e]=r,o}function q(n,e){return n.reduce((t,r)=>(t[r]=e,t),{})}var Q={mixins:[Fn],beforeConnect(){this.item=this.$el.closest(`.${this.$options.id.replace("parallax","items")} > *`)},disconnected(){this.item=null},events:[{name:"itemin itemout",self:!0,el:({item:n})=>n,handler({type:n,detail:{percent:e,duration:t,timing:r,dir:o}}){i.fastdom.read(()=>{if(!this.matchMedia)return;const c=this.getCss(J(n,o,e)),s=this.getCss(G(n)?.5:o>0?1:0);i.fastdom.write(()=>{i.css(this.$el,c),i.Transition.start(this.$el,s,t,r).catch(i.noop)})})}},{name:"transitioncanceled transitionend",self:!0,el:({item:n})=>n,handler(){i.Transition.cancel(this.$el)}},{name:"itemtranslatein itemtranslateout",self:!0,el:({item:n})=>n,handler({type:n,detail:{percent:e,dir:t}}){i.fastdom.read(()=>{if(!this.matchMedia){this.reset();return}const r=this.getCss(J(n,t,e));i.fastdom.write(()=>i.css(this.$el,r))})}}]};function G(n){return i.endsWith(n,"in")}function J(n,e,t){return t/=2,G(n)^e<0?t:1-t}return typeof window<"u"&&window.UIkit&&window.UIkit.component("sliderParallax",Q),Q});
|