@streamscloud/embeddable 15.1.0 → 16.0.0
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/ads/ad-card/cmp.ad-card.svelte +18 -29
- package/dist/ads/ad-card/cmp.ad-card.svelte.d.ts +0 -2
- package/dist/core/graphql.d.ts +1 -1
- package/dist/core/graphql.js +4 -9
- package/dist/core/media/index.d.ts +0 -2
- package/dist/core/media/index.js +0 -2
- package/dist/external-api/data-providers/internal-short-video-player-items-provider.d.ts +1 -1
- package/dist/external-api/data-providers/internal-short-video-player-items-provider.js +2 -2
- package/dist/external-api/data-providers/internal-streams-player-data-provider.js +2 -2
- package/dist/external-api/media-page/index.d.ts +1 -1
- package/dist/external-api/short-videos-player/index.d.ts +1 -1
- package/dist/external-api/streams-player/index.d.ts +1 -1
- package/dist/media-center/media-center/cmp.media-center-proxy.svelte +4 -4
- package/dist/media-center/media-center/discover/community-features-localization.d.ts +4 -6
- package/dist/media-center/media-center/discover/community-features-localization.js +12 -10
- package/dist/media-center/media-center/discover/community-features.svelte +10 -21
- package/dist/media-center/media-center/discover/community-features.svelte.d.ts +0 -2
- package/dist/media-center/media-center/discover/discover-header.svelte +14 -25
- package/dist/media-center/media-center/discover/discover-view-handler.svelte.d.ts +1 -1
- package/dist/media-center/media-center/discover/discover-view-handler.svelte.js +1 -1
- package/dist/media-center/media-center/discover/discover-view-localization.d.ts +2 -5
- package/dist/media-center/media-center/discover/discover-view-localization.js +6 -8
- package/dist/media-center/media-center/discover/discover-view.svelte +6 -19
- package/dist/media-center/media-center/footer/media-center-footer.svelte +7 -18
- package/dist/media-center/media-center/handlers/media-center-settings-handler.svelte.d.ts +1 -1
- package/dist/media-center/media-center/header/media-center-header-localization.d.ts +2 -4
- package/dist/media-center/media-center/header/media-center-header-localization.js +12 -12
- package/dist/media-center/media-center/header/media-center-header-mobile.svelte +8 -19
- package/dist/media-center/media-center/header/media-center-header-mobile.svelte.d.ts +0 -2
- package/dist/media-center/media-center/header/media-center-header.svelte +12 -23
- package/dist/media-center/media-center/media-center-context.svelte.d.ts +1 -1
- package/dist/media-center/media-center/media-center-context.svelte.js +1 -1
- package/dist/media-center/media-center/media-center-settings.svelte.d.ts +1 -1
- package/dist/media-center/media-center/media-center-view.svelte +4 -15
- package/dist/media-center/media-center/menu/category-following-wrapper.svelte +5 -16
- package/dist/media-center/media-center/menu/menu-localization.d.ts +5 -8
- package/dist/media-center/media-center/menu/menu-localization.js +15 -14
- package/dist/media-center/media-center/menu/menu.svelte +15 -26
- package/dist/media-center/media-center/moments/cmp.moments-circle.svelte +6 -17
- package/dist/media-center/media-center/moments/moments-feed-handler.svelte.d.ts +1 -1
- package/dist/media-center/media-center/moments/moments-feed-handler.svelte.js +1 -1
- package/dist/media-center/media-center/moments/moments-state.svelte.d.ts +1 -1
- package/dist/media-center/media-center/posts-feed/feed-providers-generator.d.ts +1 -1
- package/dist/media-center/media-center/posts-feed/feed-providers-generator.js +2 -2
- package/dist/media-center/media-center/posts-feed/posts-feed-handler.svelte.d.ts +2 -2
- package/dist/media-center/media-center/posts-feed/posts-feed-handler.svelte.js +2 -2
- package/dist/media-center/media-center/streams-feed/feed-providers-generator.js +2 -2
- package/dist/media-center/media-center/streams-feed/streams-feed-handler.svelte.d.ts +1 -1
- package/dist/media-center/media-center/streams-feed/streams-feed-handler.svelte.js +1 -1
- package/dist/media-center/media-center/streams-in-category/streams-in-category-panel.svelte +1 -12
- package/dist/media-center/media-center/types.d.ts +2 -2
- package/dist/media-page/index.d.ts +2 -2
- package/dist/posts/attachments/cmp.attachments.svelte +2 -15
- package/dist/posts/attachments/cmp.attachments.svelte.d.ts +0 -2
- package/dist/posts/controls/post-actions-handler.svelte.d.ts +1 -1
- package/dist/posts/controls/post-actions-handler.svelte.js +2 -3
- package/dist/posts/post-viewer/attachments-horizontal.svelte +10 -21
- package/dist/posts/post-viewer/cmp.post-viewer.svelte +7 -18
- package/dist/posts/post-viewer/cmp.post-viewer.svelte.d.ts +1 -3
- package/dist/posts/post-viewer/heading.svelte +8 -20
- package/dist/posts/post-viewer/media/post-media.svelte +11 -22
- package/dist/posts/post-viewer/media/post-media.svelte.d.ts +0 -2
- package/dist/posts/post-viewer/post-texts.svelte +6 -17
- package/dist/posts/post-viewer/post-viewer-localization.d.ts +2 -5
- package/dist/posts/post-viewer/post-viewer-localization.js +6 -8
- package/dist/posts/posts-player/cmp.posts-player.svelte.d.ts +2 -2
- package/dist/posts/posts-player/index.d.ts +1 -1
- package/dist/posts/posts-player/posts-player-proxy.svelte +5 -1
- package/dist/posts/posts-player/posts-player-proxy.svelte.d.ts +2 -2
- package/dist/posts/posts-player/posts-player-view.svelte +34 -30
- package/dist/posts/posts-player/types.d.ts +2 -2
- package/dist/products/price-helper.js +1 -1
- package/dist/products/product-card/cmp.product-card.svelte +16 -30
- package/dist/products/product-card/cmp.product-card.svelte.d.ts +0 -2
- package/dist/products/product-card/product-card-localization.d.ts +1 -3
- package/dist/products/product-card/product-card-localization.js +3 -4
- package/dist/short-videos/short-video-card/cmp.short-video-card.svelte +19 -35
- package/dist/short-videos/short-video-card/cmp.short-video-card.svelte.d.ts +0 -2
- package/dist/short-videos/short-video-card/localization.d.ts +1 -3
- package/dist/short-videos/short-video-card/localization.js +3 -4
- package/dist/streams/layout/cmp.layout.svelte +3 -14
- package/dist/streams/layout/cmp.slot-content.svelte +5 -16
- package/dist/streams/layout/cmp.slot-content.svelte.d.ts +0 -2
- package/dist/streams/layout/cmp.slot.svelte +1 -12
- package/dist/streams/layout/element-views/cmp.annotation-stream-element.svelte +2 -2
- package/dist/streams/layout/element-views/cmp.container-stream-element.svelte +2 -3
- package/dist/streams/layout/element-views/cmp.container-stream-element.svelte.d.ts +0 -2
- package/dist/streams/layout/element-views/cmp.image-ref-stream-element.svelte +1 -12
- package/dist/streams/layout/element-views/cmp.images-stream-element.svelte +3 -14
- package/dist/streams/layout/element-views/cmp.price-stream-element.svelte +2 -2
- package/dist/streams/layout/element-views/cmp.price-stream-element.svelte.d.ts +0 -2
- package/dist/streams/layout/element-views/cmp.products-slider-stream-element.svelte +4 -9
- package/dist/streams/layout/element-views/cmp.products-slider-stream-element.svelte.d.ts +0 -2
- package/dist/streams/layout/element-views/cmp.short-video-stream-element.svelte +1 -4
- package/dist/streams/layout/element-views/cmp.short-video-stream-element.svelte.d.ts +0 -2
- package/dist/streams/layout/element-views/cmp.spacer-stream-element.svelte +3 -14
- package/dist/streams/layout/element-views/cmp.stock-stream-element.svelte +3 -14
- package/dist/streams/layout/element-views/cmp.stock-stream-element.svelte.d.ts +0 -2
- package/dist/streams/layout/element-views/cmp.stream-element.svelte +7 -8
- package/dist/streams/layout/element-views/cmp.stream-element.svelte.d.ts +0 -2
- package/dist/streams/layout/element-views/cmp.text-ref-stream-element.svelte +5 -5
- package/dist/streams/layout/element-views/cmp.text-ref-stream-element.svelte.d.ts +0 -2
- package/dist/streams/layout/element-views/cmp.text-stream-element.svelte +5 -5
- package/dist/streams/layout/element-views/cmp.text-stream-element.svelte.d.ts +0 -2
- package/dist/streams/layout/element-views/cmp.web-view-stream-element.svelte +1 -12
- package/dist/streams/layout/element-views/price-element-view.svelte +7 -18
- package/dist/streams/layout/element-views/price-stream-element-localization.d.ts +2 -5
- package/dist/streams/layout/element-views/price-stream-element-localization.js +6 -8
- package/dist/streams/layout/element-views/stock-stream-element-localization.d.ts +1 -3
- package/dist/streams/layout/element-views/stock-stream-element-localization.js +3 -4
- package/dist/streams/layout/index.d.ts +1 -1
- package/dist/streams/layout/index.js +1 -1
- package/dist/streams/layout/serializer.svelte.js +5 -6
- package/dist/streams/layout/styles-transformer.d.ts +3 -3
- package/dist/streams/layout/styles-transformer.js +1 -1
- package/dist/streams/stream-card/cmp.stream-card.svelte +6 -20
- package/dist/streams/stream-page-viewer/cmp.stream-page-viewer.svelte +6 -19
- package/dist/streams/stream-page-viewer/cmp.stream-page-viewer.svelte.d.ts +1 -3
- package/dist/streams/streams-player/cmp.streams-player.svelte.d.ts +1 -1
- package/dist/streams/streams-player/index.d.ts +1 -1
- package/dist/streams/streams-player/stream-overview.svelte +5 -16
- package/dist/streams/streams-player/stream-player-localization.d.ts +1 -4
- package/dist/streams/streams-player/stream-player-localization.js +3 -6
- package/dist/streams/streams-player/streams-player-buffer.svelte.d.ts +1 -1
- package/dist/streams/streams-player/streams-player-buffer.svelte.js +1 -1
- package/dist/streams/streams-player/streams-player-proxy.svelte +5 -1
- package/dist/streams/streams-player/streams-player-proxy.svelte.d.ts +1 -1
- package/dist/streams/streams-player/streams-player-view.svelte +71 -79
- package/dist/streams/streams-player/types.d.ts +1 -1
- package/dist/ui/media-item-view/cmp.media-item-view.svelte +5 -16
- package/dist/ui/media-items-gallery/cmp.media-items-gallery.svelte +2 -16
- package/dist/ui/media-items-gallery/types.js +2 -1
- package/dist/ui/player/player/cmp.player.svelte +19 -28
- package/dist/ui/player/player/cmp.player.svelte.d.ts +1 -1
- package/dist/ui/player/player/controls-and-attachments.svelte +16 -32
- package/dist/ui/player/player/controls-and-attachments.svelte.d.ts +1 -1
- package/dist/ui/player/player/overview-panel.svelte +27 -36
- package/dist/ui/player/player/player-config.svelte.d.ts +4 -4
- package/dist/ui/player/player/player-config.svelte.js +3 -3
- package/dist/ui/player/player/player-settings.svelte.d.ts +1 -1
- package/dist/ui/player/progress/cmp.chunks-progress.svelte +1 -12
- package/dist/ui/shadow-dom/cmp.shadow-root.svelte +9 -14
- package/dist/ui/shadow-dom/cmp.shadow-root.svelte.d.ts +2 -0
- package/dist/ui/shadow-dom/colors.scss +2 -2
- package/dist/ui/shadow-dom/shadow-root-service.js +2 -2
- package/package.json +13 -25
- package/dist/core/actions/horizontal-wheel-scroll.d.ts +0 -5
- package/dist/core/actions/horizontal-wheel-scroll.js +0 -20
- package/dist/core/actions/index.d.ts +0 -2
- package/dist/core/actions/index.js +0 -2
- package/dist/core/actions/swallow-touch.d.ts +0 -2
- package/dist/core/actions/swallow-touch.js +0 -17
- package/dist/core/browser.d.ts +0 -1
- package/dist/core/browser.js +0 -1
- package/dist/core/continuation-token.d.ts +0 -11
- package/dist/core/continuation-token.js +0 -35
- package/dist/core/cursor-result.d.ts +0 -9
- package/dist/core/cursor-result.js +0 -1
- package/dist/core/data-loaders/cursor-data-loader.svelte.d.ts +0 -14
- package/dist/core/data-loaders/cursor-data-loader.svelte.js +0 -35
- package/dist/core/data-loaders/data-loader.d.ts +0 -4
- package/dist/core/data-loaders/data-loader.js +0 -1
- package/dist/core/data-loaders/index.d.ts +0 -2
- package/dist/core/data-loaders/index.js +0 -1
- package/dist/core/deferred.d.ts +0 -6
- package/dist/core/deferred.js +0 -13
- package/dist/core/document.event-handlers.d.ts +0 -2
- package/dist/core/document.event-handlers.js +0 -8
- package/dist/core/image-preloader.d.ts +0 -1
- package/dist/core/image-preloader.js +0 -10
- package/dist/core/locale.d.ts +0 -4
- package/dist/core/locale.js +0 -1
- package/dist/core/media/image-helper.d.ts +0 -10
- package/dist/core/media/image-helper.js +0 -30
- package/dist/core/media/images-size-detector.service.d.ts +0 -6
- package/dist/core/media/images-size-detector.service.js +0 -15
- package/dist/core/toastr.d.ts +0 -1
- package/dist/core/toastr.js +0 -26
- package/dist/core/transitions/index.d.ts +0 -1
- package/dist/core/transitions/index.js +0 -1
- package/dist/core/transitions/slide-horizontally.d.ts +0 -7
- package/dist/core/transitions/slide-horizontally.js +0 -55
- package/dist/core/utils/array-helper.d.ts +0 -23
- package/dist/core/utils/array-helper.js +0 -148
- package/dist/core/utils/compact-number.d.ts +0 -8
- package/dist/core/utils/compact-number.js +0 -48
- package/dist/core/utils/date-helper.d.ts +0 -29
- package/dist/core/utils/date-helper.js +0 -146
- package/dist/core/utils/dom-helper.d.ts +0 -12
- package/dist/core/utils/dom-helper.js +0 -76
- package/dist/core/utils/html-helper.d.ts +0 -42
- package/dist/core/utils/html-helper.js +0 -104
- package/dist/core/utils/index.d.ts +0 -3
- package/dist/core/utils/index.js +0 -3
- package/dist/core/utils/number-helper.d.ts +0 -6
- package/dist/core/utils/number-helper.js +0 -28
- package/dist/core/utils/string-generator.d.ts +0 -2
- package/dist/core/utils/string-generator.js +0 -15
- package/dist/core/utils/string-helper.d.ts +0 -10
- package/dist/core/utils/string-helper.js +0 -53
- package/dist/core/utils/url-helper.d.ts +0 -3
- package/dist/core/utils/url-helper.js +0 -13
- package/dist/core/utils/utils.d.ts +0 -29
- package/dist/core/utils/utils.js +0 -104
- package/dist/streams/layout/element-views/short-video-stream-element-localization.d.ts +0 -5
- package/dist/streams/layout/element-views/short-video-stream-element-localization.js +0 -7
- package/dist/streams/stream-page-viewer/stream-page-viewer-localization.d.ts +0 -5
- package/dist/streams/stream-page-viewer/stream-page-viewer-localization.js +0 -7
- package/dist/ui/button/cmp.button.svelte +0 -10
- package/dist/ui/button/cmp.button.svelte.d.ts +0 -16
- package/dist/ui/button/cmp.options-button.svelte +0 -123
- package/dist/ui/button/cmp.options-button.svelte.d.ts +0 -20
- package/dist/ui/button/index.d.ts +0 -3
- package/dist/ui/button/index.js +0 -3
- package/dist/ui/button/resources/button-base.svelte +0 -84
- package/dist/ui/button/resources/button-base.svelte.d.ts +0 -13
- package/dist/ui/button/resources/button-theme.svelte +0 -53
- package/dist/ui/button/resources/button-theme.svelte.d.ts +0 -10
- package/dist/ui/button/resources/button-types.d.ts +0 -20
- package/dist/ui/button/resources/button-types.js +0 -22
- package/dist/ui/card-actions/card-action-container.d.ts +0 -2
- package/dist/ui/card-actions/card-action-container.js +0 -17
- package/dist/ui/card-actions/cmp.card-action.svelte +0 -28
- package/dist/ui/card-actions/cmp.card-action.svelte.d.ts +0 -10
- package/dist/ui/card-actions/cmp.card-actions.svelte +0 -71
- package/dist/ui/card-actions/cmp.card-actions.svelte.d.ts +0 -9
- package/dist/ui/card-actions/index.d.ts +0 -4
- package/dist/ui/card-actions/index.js +0 -3
- package/dist/ui/card-actions/types.d.ts +0 -9
- package/dist/ui/card-actions/types.js +0 -1
- package/dist/ui/dropdown/cmp.dropdown.svelte +0 -184
- package/dist/ui/dropdown/cmp.dropdown.svelte.d.ts +0 -23
- package/dist/ui/dropdown/dropdown-ignore.d.ts +0 -6
- package/dist/ui/dropdown/dropdown-ignore.js +0 -11
- package/dist/ui/dropdown/index.d.ts +0 -3
- package/dist/ui/dropdown/index.js +0 -2
- package/dist/ui/dynamic-component/cmp.dynamic-component.svelte +0 -5
- package/dist/ui/dynamic-component/cmp.dynamic-component.svelte.d.ts +0 -7
- package/dist/ui/dynamic-component/index.d.ts +0 -2
- package/dist/ui/dynamic-component/index.js +0 -2
- package/dist/ui/dynamic-component/types.svelte.d.ts +0 -11
- package/dist/ui/dynamic-component/types.svelte.js +0 -13
- package/dist/ui/icon/cmp.icon.svelte +0 -75
- package/dist/ui/icon/cmp.icon.svelte.d.ts +0 -8
- package/dist/ui/icon/index.d.ts +0 -2
- package/dist/ui/icon/index.js +0 -2
- package/dist/ui/icon/types.d.ts +0 -9
- package/dist/ui/icon/types.js +0 -10
- package/dist/ui/image/cmp.image-round.svelte +0 -41
- package/dist/ui/image/cmp.image-round.svelte.d.ts +0 -11
- package/dist/ui/image/cmp.image-rounded.svelte +0 -64
- package/dist/ui/image/cmp.image-rounded.svelte.d.ts +0 -11
- package/dist/ui/image/cmp.image-stub.svelte +0 -31
- package/dist/ui/image/cmp.image-stub.svelte.d.ts +0 -18
- package/dist/ui/image/cmp.image.svelte +0 -79
- package/dist/ui/image/cmp.image.svelte.d.ts +0 -13
- package/dist/ui/image/image-state.d.ts +0 -6
- package/dist/ui/image/image-state.js +0 -17
- package/dist/ui/image/index.d.ts +0 -4
- package/dist/ui/image/index.js +0 -4
- package/dist/ui/infinite-scrolling/cmp.infinite-scrolling.svelte +0 -75
- package/dist/ui/infinite-scrolling/cmp.infinite-scrolling.svelte.d.ts +0 -11
- package/dist/ui/infinite-scrolling/index.d.ts +0 -1
- package/dist/ui/infinite-scrolling/index.js +0 -1
- package/dist/ui/line-clamp/cmp.line-clamp-auto.svelte +0 -119
- package/dist/ui/line-clamp/cmp.line-clamp-auto.svelte.d.ts +0 -10
- package/dist/ui/line-clamp/cmp.line-clamp.svelte +0 -84
- package/dist/ui/line-clamp/cmp.line-clamp.svelte.d.ts +0 -11
- package/dist/ui/line-clamp/index.d.ts +0 -2
- package/dist/ui/line-clamp/index.js +0 -2
- package/dist/ui/line-clamp/line-clamp-localization.d.ts +0 -6
- package/dist/ui/line-clamp/line-clamp-localization.js +0 -19
- package/dist/ui/line-clamp/line-clamp-types.d.ts +0 -3
- package/dist/ui/line-clamp/line-clamp-types.js +0 -1
- package/dist/ui/line-clamp/line-clamp-utils.d.ts +0 -8
- package/dist/ui/line-clamp/line-clamp-utils.js +0 -33
- package/dist/ui/loading/cmp.loading.svelte +0 -94
- package/dist/ui/loading/cmp.loading.svelte.d.ts +0 -9
- package/dist/ui/loading/index.d.ts +0 -1
- package/dist/ui/loading/index.js +0 -1
- package/dist/ui/media-playback/index.d.ts +0 -2
- package/dist/ui/media-playback/index.js +0 -2
- package/dist/ui/media-playback/playback-manager.svelte.d.ts +0 -25
- package/dist/ui/media-playback/playback-manager.svelte.js +0 -62
- package/dist/ui/media-playback/volume-manager.svelte.d.ts +0 -10
- package/dist/ui/media-playback/volume-manager.svelte.js +0 -27
- package/dist/ui/player/button/cmp.mobile-player-buttons.svelte +0 -37
- package/dist/ui/player/button/cmp.mobile-player-buttons.svelte.d.ts +0 -7
- package/dist/ui/player/button/cmp.player-buttons.svelte +0 -127
- package/dist/ui/player/button/cmp.player-buttons.svelte.d.ts +0 -9
- package/dist/ui/player/button/cmp.responsive-player-buttons.svelte +0 -32
- package/dist/ui/player/button/cmp.responsive-player-buttons.svelte.d.ts +0 -8
- package/dist/ui/player/button/index.d.ts +0 -4
- package/dist/ui/player/button/index.js +0 -3
- package/dist/ui/player/button/types.d.ts +0 -7
- package/dist/ui/player/button/types.js +0 -1
- package/dist/ui/player/providers/chunks-player-buffer/index.d.ts +0 -2
- package/dist/ui/player/providers/chunks-player-buffer/index.js +0 -2
- package/dist/ui/player/providers/chunks-player-buffer/player-chunk-item.svelte.d.ts +0 -9
- package/dist/ui/player/providers/chunks-player-buffer/player-chunk-item.svelte.js +0 -9
- package/dist/ui/player/providers/chunks-player-buffer/player-chunk.svelte.d.ts +0 -30
- package/dist/ui/player/providers/chunks-player-buffer/player-chunk.svelte.js +0 -73
- package/dist/ui/player/providers/chunks-player-buffer/player-chunks-manager.svelte.d.ts +0 -23
- package/dist/ui/player/providers/chunks-player-buffer/player-chunks-manager.svelte.js +0 -220
- package/dist/ui/player/providers/default-chunks-player-buffer.svelte.d.ts +0 -23
- package/dist/ui/player/providers/default-chunks-player-buffer.svelte.js +0 -71
- package/dist/ui/player/providers/default-feed-player-buffer.svelte.d.ts +0 -29
- package/dist/ui/player/providers/default-feed-player-buffer.svelte.js +0 -121
- package/dist/ui/player/providers/index.d.ts +0 -3
- package/dist/ui/player/providers/index.js +0 -2
- package/dist/ui/player/providers/service.d.ts +0 -2
- package/dist/ui/player/providers/service.js +0 -13
- package/dist/ui/player/providers/types.d.ts +0 -54
- package/dist/ui/player/providers/types.js +0 -1
- package/dist/ui/player/slider/cmp.player-slider.svelte +0 -218
- package/dist/ui/player/slider/cmp.player-slider.svelte.d.ts +0 -34
- package/dist/ui/player/slider/index.d.ts +0 -2
- package/dist/ui/player/slider/index.js +0 -2
- package/dist/ui/player/slider/prevent-slider-scroll.d.ts +0 -5
- package/dist/ui/player/slider/prevent-slider-scroll.js +0 -11
- package/dist/ui/player/slider/types.d.ts +0 -16
- package/dist/ui/player/slider/types.js +0 -1
- package/dist/ui/player/slider/wheel-gestures-adapter.d.ts +0 -17
- package/dist/ui/player/slider/wheel-gestures-adapter.js +0 -79
- package/dist/ui/player/slider-horizontal/cmp.slider.svelte +0 -424
- package/dist/ui/player/slider-horizontal/cmp.slider.svelte.d.ts +0 -31
- package/dist/ui/player/slider-horizontal/index.d.ts +0 -2
- package/dist/ui/player/slider-horizontal/index.js +0 -2
- package/dist/ui/player/slider-horizontal/slider-localization.d.ts +0 -5
- package/dist/ui/player/slider-horizontal/slider-localization.js +0 -13
- package/dist/ui/player/slider-horizontal/types.d.ts +0 -11
- package/dist/ui/player/slider-horizontal/types.js +0 -8
- package/dist/ui/player/utils/index.d.ts +0 -1
- package/dist/ui/player/utils/index.js +0 -1
- package/dist/ui/player/utils/touch-synchronizer.d.ts +0 -7
- package/dist/ui/player/utils/touch-synchronizer.js +0 -21
- package/dist/ui/progress/cmp.progress.svelte +0 -40
- package/dist/ui/progress/cmp.progress.svelte.d.ts +0 -6
- package/dist/ui/progress/index.d.ts +0 -1
- package/dist/ui/progress/index.js +0 -1
- package/dist/ui/proportional-container/cmp.proportional-container.svelte +0 -39
- package/dist/ui/proportional-container/cmp.proportional-container.svelte.d.ts +0 -8
- package/dist/ui/proportional-container/index.d.ts +0 -1
- package/dist/ui/proportional-container/index.js +0 -1
- package/dist/ui/seek-bar/cmp.seek-bar.svelte +0 -167
- package/dist/ui/seek-bar/cmp.seek-bar.svelte.d.ts +0 -15
- package/dist/ui/seek-bar/index.d.ts +0 -1
- package/dist/ui/seek-bar/index.js +0 -1
- package/dist/ui/shadow-dom/normalize-shadow.css +0 -350
- package/dist/ui/shadow-dom/reset-shadow.css +0 -176
- package/dist/ui/swipe-indicator/cmp.swipe-indicator.svelte +0 -124
- package/dist/ui/swipe-indicator/cmp.swipe-indicator.svelte.d.ts +0 -8
- package/dist/ui/swipe-indicator/index.d.ts +0 -1
- package/dist/ui/swipe-indicator/index.js +0 -1
- package/dist/ui/swipe-indicator/swipe-indicator-localization.d.ts +0 -5
- package/dist/ui/swipe-indicator/swipe-indicator-localization.js +0 -13
- package/dist/ui/time-ago/cmp.time-ago.svelte +0 -69
- package/dist/ui/time-ago/cmp.time-ago.svelte.d.ts +0 -9
- package/dist/ui/time-ago/index.d.ts +0 -1
- package/dist/ui/time-ago/index.js +0 -1
- package/dist/ui/time-ago/time-ago-localization.d.ts +0 -12
- package/dist/ui/time-ago/time-ago-localization.js +0 -55
- package/dist/ui/video/cmp.video.svelte +0 -387
- package/dist/ui/video/cmp.video.svelte.d.ts +0 -27
- package/dist/ui/video/index.d.ts +0 -2
- package/dist/ui/video/index.js +0 -2
- package/dist/ui/video/types.d.ts +0 -4
- package/dist/ui/video/types.js +0 -5
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { nanoid } from 'nanoid';
|
|
2
|
-
const characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz';
|
|
3
|
-
export function generateString(length) {
|
|
4
|
-
let result = '';
|
|
5
|
-
const charactersLength = characters.length;
|
|
6
|
-
let counter = 0;
|
|
7
|
-
while (counter < length) {
|
|
8
|
-
result += characters.charAt(Math.floor(Math.random() * charactersLength));
|
|
9
|
-
counter += 1;
|
|
10
|
-
}
|
|
11
|
-
return result;
|
|
12
|
-
}
|
|
13
|
-
export const randomNanoid = (size = 15) => {
|
|
14
|
-
return nanoid(size);
|
|
15
|
-
};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export declare class StringHelper {
|
|
2
|
-
static isBlobUrl(val: string | null | undefined): boolean;
|
|
3
|
-
static isEmail(val: string): boolean;
|
|
4
|
-
static isNumeric(n: string): boolean;
|
|
5
|
-
static isUrl(val: string): boolean;
|
|
6
|
-
static toKebabCase(str: string): string;
|
|
7
|
-
static toSnakeCase(str: string): string;
|
|
8
|
-
static truncate(str: string, length: number): string;
|
|
9
|
-
static capitalizeFirstLetter(word: string): string;
|
|
10
|
-
}
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
export class StringHelper {
|
|
2
|
-
static isBlobUrl(val) {
|
|
3
|
-
return !!val && val.startsWith('blob:');
|
|
4
|
-
}
|
|
5
|
-
static isEmail(val) {
|
|
6
|
-
if (!val) {
|
|
7
|
-
return false;
|
|
8
|
-
}
|
|
9
|
-
const re = /^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
|
|
10
|
-
return re.test(String(val).toLowerCase());
|
|
11
|
-
}
|
|
12
|
-
static isNumeric(n) {
|
|
13
|
-
const parsed = parseFloat(n);
|
|
14
|
-
return !isNaN(parsed) && isFinite(parsed);
|
|
15
|
-
}
|
|
16
|
-
static isUrl(val) {
|
|
17
|
-
if (!val) {
|
|
18
|
-
return false;
|
|
19
|
-
}
|
|
20
|
-
try {
|
|
21
|
-
const url = new URL(val);
|
|
22
|
-
return (val.startsWith('http://') || val.startsWith('https://')) && url && ['http:', 'https:'].includes(url.protocol);
|
|
23
|
-
}
|
|
24
|
-
catch {
|
|
25
|
-
return false;
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
static toKebabCase(str) {
|
|
29
|
-
return (str
|
|
30
|
-
.match(/[A-Z]{2,}(?=[A-Z][a-z]+[0-9]*|\b)|[A-Z]?[a-z]+[0-9]*|[A-Z]|[0-9]+/g)
|
|
31
|
-
?.join('-')
|
|
32
|
-
.toLowerCase() || str);
|
|
33
|
-
}
|
|
34
|
-
static toSnakeCase(str) {
|
|
35
|
-
if (!str) {
|
|
36
|
-
return str;
|
|
37
|
-
}
|
|
38
|
-
return str
|
|
39
|
-
.split(/(?=[A-Z])/)
|
|
40
|
-
.join('_')
|
|
41
|
-
.toLowerCase();
|
|
42
|
-
}
|
|
43
|
-
static truncate(str, length) {
|
|
44
|
-
if (str.length <= length) {
|
|
45
|
-
return str;
|
|
46
|
-
}
|
|
47
|
-
str = str.slice(0, length) + '...';
|
|
48
|
-
return str;
|
|
49
|
-
}
|
|
50
|
-
static capitalizeFirstLetter(word) {
|
|
51
|
-
return word.charAt(0).toUpperCase() + word.slice(1);
|
|
52
|
-
}
|
|
53
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
export class UrlHelper {
|
|
2
|
-
static getRootDomain(url) {
|
|
3
|
-
let tokens = url.hostname.split('.');
|
|
4
|
-
if (tokens.length <= 2) {
|
|
5
|
-
return url.hostname;
|
|
6
|
-
}
|
|
7
|
-
tokens = tokens.slice(-3);
|
|
8
|
-
if (['co', 'com'].indexOf(tokens[1]) > -1) {
|
|
9
|
-
return tokens.join('.');
|
|
10
|
-
}
|
|
11
|
-
return tokens.slice(-2).join('.');
|
|
12
|
-
}
|
|
13
|
-
}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
export declare class Utils {
|
|
2
|
-
static areEqual(value: unknown, other: unknown): boolean;
|
|
3
|
-
static assertUnreachable(_x: never): never;
|
|
4
|
-
static clone<T>(value: T): T;
|
|
5
|
-
/**
|
|
6
|
-
* Find the greatest common divisor of 2 numbers
|
|
7
|
-
*/
|
|
8
|
-
static gcd(a: number, b: number): number;
|
|
9
|
-
/**
|
|
10
|
-
* Find the least dividend and divisor by given quotient
|
|
11
|
-
*/
|
|
12
|
-
static ldd(quotient: number, divisorLimit?: number): {
|
|
13
|
-
dividend: number;
|
|
14
|
-
divisor: number;
|
|
15
|
-
} | null;
|
|
16
|
-
/**
|
|
17
|
-
* Returns a function, that, as long as it continues to be invoked, will not
|
|
18
|
-
* be triggered. The function will be called after it stops being called for
|
|
19
|
-
* N milliseconds.
|
|
20
|
-
*/
|
|
21
|
-
static debounce(func: (...args: any[]) => void, wait: number): (...args: unknown[]) => void;
|
|
22
|
-
static throttle<T extends (...args: any[]) => any>(func: T, wait: number): (...args: Parameters<T>) => ReturnType<T>;
|
|
23
|
-
static sleep: (s: number) => Promise<void>;
|
|
24
|
-
static nameof: <T>(name: keyof T) => keyof T;
|
|
25
|
-
static unsubscribe(sub: UnsubscribeMethod | UnsubscribeMethod[]): void;
|
|
26
|
-
static notNullValues(target: object): any[];
|
|
27
|
-
}
|
|
28
|
-
export type Without<T, K> = Pick<T, Exclude<keyof T, K>>;
|
|
29
|
-
export type UnsubscribeMethod = () => void;
|
package/dist/core/utils/utils.js
DELETED
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
import { dequal as isEqual } from 'dequal/lite';
|
|
2
|
-
export class Utils {
|
|
3
|
-
static areEqual(value, other) {
|
|
4
|
-
return isEqual(value, other);
|
|
5
|
-
}
|
|
6
|
-
static assertUnreachable(_x) {
|
|
7
|
-
throw new Error("Didn't expect to get here");
|
|
8
|
-
}
|
|
9
|
-
static clone(value) {
|
|
10
|
-
return structuredClone(value);
|
|
11
|
-
}
|
|
12
|
-
/**
|
|
13
|
-
* Find the greatest common divisor of 2 numbers
|
|
14
|
-
*/
|
|
15
|
-
static gcd(a, b) {
|
|
16
|
-
a = Math.abs(a);
|
|
17
|
-
b = Math.abs(b);
|
|
18
|
-
if (b > a) {
|
|
19
|
-
const temp = a;
|
|
20
|
-
a = b;
|
|
21
|
-
b = temp;
|
|
22
|
-
}
|
|
23
|
-
while (true) {
|
|
24
|
-
if (b === 0) {
|
|
25
|
-
return a;
|
|
26
|
-
}
|
|
27
|
-
a %= b;
|
|
28
|
-
if (a === 0) {
|
|
29
|
-
return b;
|
|
30
|
-
}
|
|
31
|
-
b %= a;
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
/**
|
|
35
|
-
* Find the least dividend and divisor by given quotient
|
|
36
|
-
*/
|
|
37
|
-
static ldd(quotient, divisorLimit = 1000000) {
|
|
38
|
-
let divisor = 1;
|
|
39
|
-
while (divisor <= divisorLimit) {
|
|
40
|
-
const dividend = quotient * divisor;
|
|
41
|
-
if (dividend % 1 === 0) {
|
|
42
|
-
return { dividend, divisor };
|
|
43
|
-
}
|
|
44
|
-
divisor++;
|
|
45
|
-
}
|
|
46
|
-
return null;
|
|
47
|
-
}
|
|
48
|
-
/**
|
|
49
|
-
* Returns a function, that, as long as it continues to be invoked, will not
|
|
50
|
-
* be triggered. The function will be called after it stops being called for
|
|
51
|
-
* N milliseconds.
|
|
52
|
-
*/
|
|
53
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
54
|
-
static debounce(func, wait) {
|
|
55
|
-
let timeout;
|
|
56
|
-
return (...args) => {
|
|
57
|
-
const later = () => {
|
|
58
|
-
func.apply(this, args);
|
|
59
|
-
};
|
|
60
|
-
clearTimeout(timeout);
|
|
61
|
-
timeout = window.setTimeout(later, wait);
|
|
62
|
-
};
|
|
63
|
-
}
|
|
64
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
65
|
-
static throttle(func, wait) {
|
|
66
|
-
// Capture the current time
|
|
67
|
-
let time = Date.now();
|
|
68
|
-
return (...args) => {
|
|
69
|
-
if (time + wait - Date.now() <= 0) {
|
|
70
|
-
time = Date.now();
|
|
71
|
-
// Run the function we've passed to our throttler,
|
|
72
|
-
// and reset the `time` variable (so we can check again).
|
|
73
|
-
return func.apply(this, args);
|
|
74
|
-
}
|
|
75
|
-
return null;
|
|
76
|
-
};
|
|
77
|
-
}
|
|
78
|
-
static sleep = async (s) => {
|
|
79
|
-
await setTimeout(() => {
|
|
80
|
-
return;
|
|
81
|
-
}, s);
|
|
82
|
-
};
|
|
83
|
-
static nameof = (name) => name;
|
|
84
|
-
static unsubscribe(sub) {
|
|
85
|
-
if (!sub) {
|
|
86
|
-
return;
|
|
87
|
-
}
|
|
88
|
-
const unsubscribeSingle = (sub) => {
|
|
89
|
-
if (!sub) {
|
|
90
|
-
return;
|
|
91
|
-
}
|
|
92
|
-
sub();
|
|
93
|
-
};
|
|
94
|
-
if (sub instanceof Array) {
|
|
95
|
-
sub.forEach(unsubscribeSingle);
|
|
96
|
-
}
|
|
97
|
-
else {
|
|
98
|
-
unsubscribeSingle(sub);
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
static notNullValues(target) {
|
|
102
|
-
return Object.values(target).filter((x) => !!x);
|
|
103
|
-
}
|
|
104
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
<script lang="ts">import ButtonBase from './resources/button-base.svelte';
|
|
2
|
-
import ButtonTheme from './resources/button-theme.svelte';
|
|
3
|
-
let { type = 'button', disabled = false, autofocus = false, style = null, size = null, on, children } = $props();
|
|
4
|
-
</script>
|
|
5
|
-
|
|
6
|
-
<ButtonTheme style={style} size={size}>
|
|
7
|
-
<ButtonBase disabled={disabled} type={type} autofocus={autofocus} on={on}>
|
|
8
|
-
{@render children()}
|
|
9
|
-
</ButtonBase>
|
|
10
|
-
</ButtonTheme>
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import type { ButtonStyle, ButtonSize } from './resources/button-types';
|
|
2
|
-
import type { Snippet } from 'svelte';
|
|
3
|
-
type Props = {
|
|
4
|
-
type?: 'button' | 'submit' | 'reset';
|
|
5
|
-
disabled?: boolean;
|
|
6
|
-
autofocus?: boolean;
|
|
7
|
-
style?: ButtonStyle | null;
|
|
8
|
-
size?: ButtonSize | null;
|
|
9
|
-
on?: {
|
|
10
|
-
click: (e: MouseEvent) => void;
|
|
11
|
-
};
|
|
12
|
-
children: Snippet;
|
|
13
|
-
};
|
|
14
|
-
declare const Cmp: import("svelte").Component<Props, {}, "">;
|
|
15
|
-
type Cmp = ReturnType<typeof Cmp>;
|
|
16
|
-
export default Cmp;
|
|
@@ -1,123 +0,0 @@
|
|
|
1
|
-
<script lang="ts">import { Dropdown } from '../dropdown';
|
|
2
|
-
import { Icon } from '../icon';
|
|
3
|
-
import ButtonBase from './resources/button-base.svelte';
|
|
4
|
-
import ButtonTheme from './resources/button-theme.svelte';
|
|
5
|
-
import IconChevronDown from '@fluentui/svg-icons/icons/chevron_down_20_regular.svg?raw';
|
|
6
|
-
let { type = 'button', disabled = false, autofocus = false, style = null, size = null, optionsPosition = 'bottom-start', on, children, options, rightOptions } = $props();
|
|
7
|
-
</script>
|
|
8
|
-
|
|
9
|
-
<ButtonTheme style={style} size={size}>
|
|
10
|
-
<div class="options-button" class:options-button--disabled={disabled}>
|
|
11
|
-
{#if options}
|
|
12
|
-
<div class="options-button__options">
|
|
13
|
-
<Dropdown position={optionsPosition} disabled={disabled} offset={4}>
|
|
14
|
-
{#snippet trigger()}
|
|
15
|
-
<button class="options-button__options-trigger" type="button" disabled={disabled} aria-label="none">
|
|
16
|
-
<Icon src={IconChevronDown} />
|
|
17
|
-
</button>
|
|
18
|
-
{/snippet}
|
|
19
|
-
{@render options()}
|
|
20
|
-
</Dropdown>
|
|
21
|
-
</div>
|
|
22
|
-
<span class="options-button__options-separator">‍</span>
|
|
23
|
-
{/if}
|
|
24
|
-
<div class="options-button__trigger">
|
|
25
|
-
<ButtonBase type={type} disabled={disabled} autofocus={autofocus} on={on}>
|
|
26
|
-
{@render children()}
|
|
27
|
-
</ButtonBase>
|
|
28
|
-
</div>
|
|
29
|
-
{#if rightOptions}
|
|
30
|
-
<span class="options-button__options-separator">‍</span>
|
|
31
|
-
<div class="options-button__options">
|
|
32
|
-
<Dropdown position={optionsPosition} disabled={disabled} offset={4}>
|
|
33
|
-
{#snippet trigger()}
|
|
34
|
-
<button class="options-button__options-trigger" type="button" disabled={disabled} aria-label="none">
|
|
35
|
-
<Icon src={IconChevronDown} />
|
|
36
|
-
</button>
|
|
37
|
-
{/snippet}
|
|
38
|
-
{@render rightOptions()}
|
|
39
|
-
</Dropdown>
|
|
40
|
-
</div>
|
|
41
|
-
{/if}
|
|
42
|
-
</div>
|
|
43
|
-
</ButtonTheme>
|
|
44
|
-
|
|
45
|
-
<style>@keyframes fadeIn {
|
|
46
|
-
0% {
|
|
47
|
-
opacity: 1;
|
|
48
|
-
}
|
|
49
|
-
50% {
|
|
50
|
-
opacity: 0.4;
|
|
51
|
-
}
|
|
52
|
-
100% {
|
|
53
|
-
opacity: 1;
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
.options-button {
|
|
57
|
-
--_options-button--font--color: var(--button--font--color, black);
|
|
58
|
-
--_options-button--font-weight: var(--button--font-weight, 400);
|
|
59
|
-
--_options-button--text--font-size: var(--button--text--font-size, 0.875em);
|
|
60
|
-
--_options-button--background: var(--button--background, white);
|
|
61
|
-
--_options-button--background--hover: var(--button--background--hover, var(--_options-button--background));
|
|
62
|
-
--_options-button--background--active: var(--button--background--active, var(--_options-button--background));
|
|
63
|
-
--_options-button--background--disabled: var(--button--background--disabled, var(--_options-button--background));
|
|
64
|
-
--_options-button--border: var(--button--border, none);
|
|
65
|
-
--_options-button--border-radius: var(--button--border-radius, 0.25em);
|
|
66
|
-
--_options-button--box-shadow: var(--button--box-shadow, none);
|
|
67
|
-
--_options-button--padding--vertical: var(--button--padding--vertical, 0);
|
|
68
|
-
--_options-button--min-width: var(--button--min-width, 0);
|
|
69
|
-
--_options-button--height: var(--button--height, 2em);
|
|
70
|
-
--_options-button--separator--border: 1px solid var(--_options-button--font--color);
|
|
71
|
-
--_options-button--dropdown--min-width: var(--options-button--dropdown--min-width, 10em);
|
|
72
|
-
font-weight: var(--_options-button--font-weight);
|
|
73
|
-
color: var(--_options-button--font--color);
|
|
74
|
-
background: var(--_options-button--background);
|
|
75
|
-
border: var(--_options-button--border);
|
|
76
|
-
border-radius: var(--_options-button--border-radius);
|
|
77
|
-
min-width: var(--_options-button--min-width);
|
|
78
|
-
height: var(--_options-button--height);
|
|
79
|
-
display: inline-flex;
|
|
80
|
-
align-items: center;
|
|
81
|
-
vertical-align: middle;
|
|
82
|
-
white-space: nowrap;
|
|
83
|
-
box-shadow: var(--_options-button--box-shadow);
|
|
84
|
-
}
|
|
85
|
-
.options-button--disabled {
|
|
86
|
-
background: var(--_options-button--background--disabled);
|
|
87
|
-
}
|
|
88
|
-
.options-button__trigger {
|
|
89
|
-
display: inline-flex;
|
|
90
|
-
height: 100%;
|
|
91
|
-
flex: 1;
|
|
92
|
-
--button--min-width: 100%;
|
|
93
|
-
--button--box-shadow: none;
|
|
94
|
-
--button--border: none;
|
|
95
|
-
--button--border--disabled: none;
|
|
96
|
-
--button--height: 100%;
|
|
97
|
-
--button--background: transparent;
|
|
98
|
-
--button--background--disabled: transparent;
|
|
99
|
-
}
|
|
100
|
-
.options-button__options-trigger {
|
|
101
|
-
height: 100%;
|
|
102
|
-
font-size: var(--_options-button--text--font-size);
|
|
103
|
-
border-radius: var(--_options-button--border-radius);
|
|
104
|
-
}
|
|
105
|
-
.options-button__options {
|
|
106
|
-
height: 100%;
|
|
107
|
-
--dropdown-item--min-width: var(--_options-button--dropdown--min-width);
|
|
108
|
-
--button--min-width: 100%;
|
|
109
|
-
--button--justify-content: flex-start;
|
|
110
|
-
}
|
|
111
|
-
.options-button__options-trigger {
|
|
112
|
-
padding: var(--_options-button--padding--vertical) 0.5em;
|
|
113
|
-
}
|
|
114
|
-
.options-button__options-trigger:not(:disabled):hover {
|
|
115
|
-
background: var(--_options-button--background--hover);
|
|
116
|
-
}
|
|
117
|
-
.options-button__options-trigger:not(:disabled):active {
|
|
118
|
-
background: var(--_options-button--background--active);
|
|
119
|
-
}
|
|
120
|
-
.options-button__options-separator {
|
|
121
|
-
border-right: var(--_options-button--separator--border);
|
|
122
|
-
height: var(--_options-button--text--font-size);
|
|
123
|
-
}</style>
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { type DropdownPosition } from '../dropdown';
|
|
2
|
-
import type { ButtonStyle, ButtonSize } from './resources/button-types';
|
|
3
|
-
import type { Snippet } from 'svelte';
|
|
4
|
-
type Props = {
|
|
5
|
-
type?: 'button' | 'submit' | 'reset';
|
|
6
|
-
disabled?: boolean;
|
|
7
|
-
autofocus?: boolean;
|
|
8
|
-
style?: ButtonStyle | null;
|
|
9
|
-
size?: ButtonSize | null;
|
|
10
|
-
optionsPosition?: DropdownPosition;
|
|
11
|
-
on?: {
|
|
12
|
-
click: (e: MouseEvent) => void;
|
|
13
|
-
};
|
|
14
|
-
children: Snippet;
|
|
15
|
-
options?: Snippet;
|
|
16
|
-
rightOptions?: Snippet;
|
|
17
|
-
};
|
|
18
|
-
declare const Cmp: import("svelte").Component<Props, {}, "">;
|
|
19
|
-
type Cmp = ReturnType<typeof Cmp>;
|
|
20
|
-
export default Cmp;
|
package/dist/ui/button/index.js
DELETED
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
<script lang="ts">import { onMount } from 'svelte';
|
|
2
|
-
let { type = 'button', disabled = false, autofocus = false, on, children } = $props();
|
|
3
|
-
let buttonRef;
|
|
4
|
-
onMount(() => {
|
|
5
|
-
if (autofocus) {
|
|
6
|
-
buttonRef.focus();
|
|
7
|
-
}
|
|
8
|
-
});
|
|
9
|
-
</script>
|
|
10
|
-
|
|
11
|
-
<button class="button" disabled={disabled} type={type} bind:this={buttonRef} onclick={(e) => on?.click?.(e)}>
|
|
12
|
-
<span class="button__text">
|
|
13
|
-
{@render children()}
|
|
14
|
-
</span>
|
|
15
|
-
</button>
|
|
16
|
-
|
|
17
|
-
<style>@keyframes fadeIn {
|
|
18
|
-
0% {
|
|
19
|
-
opacity: 1;
|
|
20
|
-
}
|
|
21
|
-
50% {
|
|
22
|
-
opacity: 0.4;
|
|
23
|
-
}
|
|
24
|
-
100% {
|
|
25
|
-
opacity: 1;
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
.button {
|
|
29
|
-
--_button--font--size: var(--button--font--size, 1rem);
|
|
30
|
-
--_button--font--color: var(--button--font--color, black);
|
|
31
|
-
--_button--font-weight: var(--button--font-weight, 400);
|
|
32
|
-
--_button--text--font-size: var(--button--text--font-size, 0.75em);
|
|
33
|
-
--_button--icon--font-size: var(--button--icon--font-size, 1em);
|
|
34
|
-
--_button--justify-content: var(--button--justify-content, center);
|
|
35
|
-
--_button--background: var(--button--background, white);
|
|
36
|
-
--_button--background--hover: var(--button--background--hover, var(--_button--background));
|
|
37
|
-
--_button--background--active: var(--button--background--active, var(--_button--background));
|
|
38
|
-
--_button--background--disabled: var(--button--background--disabled, var(--_button--background));
|
|
39
|
-
--_button--border: var(--button--border, none);
|
|
40
|
-
--_button--border-radius: var(--button--border-radius, 0.25em);
|
|
41
|
-
--_button--padding--vertical: var(--button--padding--vertical, 0);
|
|
42
|
-
--_button--padding--horizontal: var(--button--padding--horizontal, 1em);
|
|
43
|
-
--_button--min-width: var(--button--min-width, 0);
|
|
44
|
-
--_button--height: var(--button--height, 2em);
|
|
45
|
-
--_button--box-shadow: var(--button--box-shadow, none);
|
|
46
|
-
font-size: var(--_button--font--size);
|
|
47
|
-
font-weight: var(--_button--font-weight);
|
|
48
|
-
padding: var(--_button--padding--vertical) var(--_button--padding--horizontal);
|
|
49
|
-
color: var(--_button--font--color);
|
|
50
|
-
background: var(--_button--background);
|
|
51
|
-
box-shadow: var(--_button--box-shadow);
|
|
52
|
-
border: var(--_button--border);
|
|
53
|
-
border-radius: var(--_button--border-radius);
|
|
54
|
-
min-width: var(--_button--min-width);
|
|
55
|
-
max-width: 100%;
|
|
56
|
-
height: var(--_button--height);
|
|
57
|
-
outline: none;
|
|
58
|
-
display: inline-flex;
|
|
59
|
-
flex: 1;
|
|
60
|
-
justify-content: var(--_button--justify-content);
|
|
61
|
-
align-items: center;
|
|
62
|
-
vertical-align: middle;
|
|
63
|
-
transition: background-color linear 0.2s, color linear 0.2s, border-color linear 0.2s, filter linear 0.2s;
|
|
64
|
-
white-space: nowrap;
|
|
65
|
-
}
|
|
66
|
-
.button__text {
|
|
67
|
-
width: 100%;
|
|
68
|
-
text-align: center;
|
|
69
|
-
font-size: var(--_button--text--font-size);
|
|
70
|
-
--icon-text--global--font-size: 1rem;
|
|
71
|
-
--icon-text--text--font-size: var(--_button--text--font-size);
|
|
72
|
-
--icon-text--icon--font-size: var(--_button--icon--font-size);
|
|
73
|
-
--icon-text--justify-content: var(--_button--justify-content);
|
|
74
|
-
}
|
|
75
|
-
.button:not(:disabled):hover {
|
|
76
|
-
background: var(--_button--background--hover);
|
|
77
|
-
}
|
|
78
|
-
.button:not(:disabled):active {
|
|
79
|
-
background: var(--_button--background--active);
|
|
80
|
-
}
|
|
81
|
-
.button:disabled {
|
|
82
|
-
cursor: default;
|
|
83
|
-
background: var(--_button--background--disabled);
|
|
84
|
-
}</style>
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { type Snippet } from 'svelte';
|
|
2
|
-
type Props = {
|
|
3
|
-
type?: 'button' | 'submit' | 'reset';
|
|
4
|
-
disabled?: boolean;
|
|
5
|
-
autofocus?: boolean;
|
|
6
|
-
on?: {
|
|
7
|
-
click?: (e: MouseEvent) => void;
|
|
8
|
-
};
|
|
9
|
-
children: Snippet;
|
|
10
|
-
};
|
|
11
|
-
declare const ButtonBase: import("svelte").Component<Props, {}, "">;
|
|
12
|
-
type ButtonBase = ReturnType<typeof ButtonBase>;
|
|
13
|
-
export default ButtonBase;
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
<script lang="ts">import { ButtonStyle, ButtonSize } from './button-types';
|
|
2
|
-
let { style = undefined, size = ButtonSize.Standard, children } = $props();
|
|
3
|
-
</script>
|
|
4
|
-
|
|
5
|
-
<div
|
|
6
|
-
class="button-theme"
|
|
7
|
-
class:button-theme--standard={style === ButtonStyle.Standard}
|
|
8
|
-
class:button-theme--primary={style === ButtonStyle.Primary}
|
|
9
|
-
class:button-theme--alert={style === ButtonStyle.Alert}
|
|
10
|
-
class:button-theme--white={style === ButtonStyle.White}
|
|
11
|
-
class:button-theme--gray={style === ButtonStyle.Gray}
|
|
12
|
-
class:button-theme--green={style === ButtonStyle.Green}
|
|
13
|
-
class:button-theme--text-only={style === ButtonStyle.TextOnly}
|
|
14
|
-
class:button-theme--transparent-success={style === ButtonStyle.TransparentSuccess}
|
|
15
|
-
class:button-theme--transparent-primary={style === ButtonStyle.TransparentPrimary}
|
|
16
|
-
class:button-theme--transparent-gray={style === ButtonStyle.TransparentGray}
|
|
17
|
-
class:button-theme--transparent-white={style === ButtonStyle.TransparentWhite}
|
|
18
|
-
class:button-theme--transparent-warning={style === ButtonStyle.TransparentWarning}
|
|
19
|
-
class:button-theme--transparent-destructive={style === ButtonStyle.TransparentDestructive}
|
|
20
|
-
class:button-theme--size-standard={size === ButtonSize.Standard}
|
|
21
|
-
class:button-theme--size-large={size === ButtonSize.Large}
|
|
22
|
-
class:button-theme--size-small={size === ButtonSize.Small}>
|
|
23
|
-
{@render children()}
|
|
24
|
-
</div>
|
|
25
|
-
|
|
26
|
-
<style>.button-theme {
|
|
27
|
-
display: contents;
|
|
28
|
-
}
|
|
29
|
-
.button-theme--standard {
|
|
30
|
-
--button--font--color: var(--sc-mc-color--text-primary);
|
|
31
|
-
--button--background: var(--sc-mc-color--bg-button);
|
|
32
|
-
--button--background--hover: light-dark(#f9fafb, #1f2937);
|
|
33
|
-
--button--background--active: light-dark(#f2f2f3, #374151);
|
|
34
|
-
--button--background--disabled: light-dark(#f2f2f3, #374151);
|
|
35
|
-
--button--border: 1px solid light-dark(#e5e7eb, #4b5563);
|
|
36
|
-
}
|
|
37
|
-
.button-theme {
|
|
38
|
-
/*Size*/
|
|
39
|
-
}
|
|
40
|
-
.button-theme--size-standard {
|
|
41
|
-
--button--height: 2em;
|
|
42
|
-
--button--text--font-size: 0.75em;
|
|
43
|
-
}
|
|
44
|
-
.button-theme--size-large {
|
|
45
|
-
--button--height: 3em;
|
|
46
|
-
--button--font-weight: 500;
|
|
47
|
-
--icon--stroke-width: 0.4;
|
|
48
|
-
--button--text--font-size: 0.9375em;
|
|
49
|
-
}
|
|
50
|
-
.button-theme--size-small {
|
|
51
|
-
--button--height: 1.75em;
|
|
52
|
-
--button--text--font-size: 0.75em;
|
|
53
|
-
}</style>
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { ButtonStyle, ButtonSize } from './button-types';
|
|
2
|
-
import type { Snippet } from 'svelte';
|
|
3
|
-
type Props = {
|
|
4
|
-
style?: ButtonStyle | null;
|
|
5
|
-
size?: ButtonSize | null;
|
|
6
|
-
children: Snippet;
|
|
7
|
-
};
|
|
8
|
-
declare const ButtonTheme: import("svelte").Component<Props, {}, "">;
|
|
9
|
-
type ButtonTheme = ReturnType<typeof ButtonTheme>;
|
|
10
|
-
export default ButtonTheme;
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
export declare enum ButtonStyle {
|
|
2
|
-
Primary = "primary",
|
|
3
|
-
Standard = "standard",
|
|
4
|
-
Alert = "alert",
|
|
5
|
-
White = "white",
|
|
6
|
-
Gray = "gray",
|
|
7
|
-
Green = "green",
|
|
8
|
-
TextOnly = "text-only",
|
|
9
|
-
TransparentSuccess = "transparent-success",
|
|
10
|
-
TransparentPrimary = "transparent-primary",
|
|
11
|
-
TransparentGray = "transparent-gray",
|
|
12
|
-
TransparentWhite = "transparent-white",
|
|
13
|
-
TransparentWarning = "transparent-warning",
|
|
14
|
-
TransparentDestructive = "transparent-destructive"
|
|
15
|
-
}
|
|
16
|
-
export declare enum ButtonSize {
|
|
17
|
-
Standard = "Standard",
|
|
18
|
-
Large = "Large",
|
|
19
|
-
Small = "Small"
|
|
20
|
-
}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
export var ButtonStyle;
|
|
2
|
-
(function (ButtonStyle) {
|
|
3
|
-
ButtonStyle["Primary"] = "primary";
|
|
4
|
-
ButtonStyle["Standard"] = "standard";
|
|
5
|
-
ButtonStyle["Alert"] = "alert";
|
|
6
|
-
ButtonStyle["White"] = "white";
|
|
7
|
-
ButtonStyle["Gray"] = "gray";
|
|
8
|
-
ButtonStyle["Green"] = "green";
|
|
9
|
-
ButtonStyle["TextOnly"] = "text-only";
|
|
10
|
-
ButtonStyle["TransparentSuccess"] = "transparent-success";
|
|
11
|
-
ButtonStyle["TransparentPrimary"] = "transparent-primary";
|
|
12
|
-
ButtonStyle["TransparentGray"] = "transparent-gray";
|
|
13
|
-
ButtonStyle["TransparentWhite"] = "transparent-white";
|
|
14
|
-
ButtonStyle["TransparentWarning"] = "transparent-warning";
|
|
15
|
-
ButtonStyle["TransparentDestructive"] = "transparent-destructive";
|
|
16
|
-
})(ButtonStyle || (ButtonStyle = {}));
|
|
17
|
-
export var ButtonSize;
|
|
18
|
-
(function (ButtonSize) {
|
|
19
|
-
ButtonSize["Standard"] = "Standard";
|
|
20
|
-
ButtonSize["Large"] = "Large";
|
|
21
|
-
ButtonSize["Small"] = "Small";
|
|
22
|
-
})(ButtonSize || (ButtonSize = {}));
|