@streamscloud/embeddable 1.1.2
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/README.md +1 -0
- package/dist/advertising/ad-view/cmp.ad-view.svelte +82 -0
- package/dist/advertising/ad-view/cmp.ad-view.svelte.d.ts +8 -0
- package/dist/advertising/ad-view/index.d.ts +2 -0
- package/dist/advertising/ad-view/index.js +1 -0
- package/dist/advertising/ad-view/mapper.d.ts +3 -0
- package/dist/advertising/ad-view/mapper.js +16 -0
- package/dist/advertising/ad-view/operations.generated.d.ts +17 -0
- package/dist/advertising/ad-view/operations.generated.js +46 -0
- package/dist/advertising/ad-view/operations.graphql +14 -0
- package/dist/advertising/ad-view/types.d.ts +10 -0
- package/dist/advertising/ad-view/types.js +1 -0
- package/dist/advertising/index.d.ts +1 -0
- package/dist/advertising/index.js +1 -0
- package/dist/advertising/types.d.ts +5 -0
- package/dist/advertising/types.js +6 -0
- package/dist/core/continuation-token.d.ts +10 -0
- package/dist/core/continuation-token.js +32 -0
- package/dist/core/cursor-result.d.ts +9 -0
- package/dist/core/cursor-result.js +1 -0
- package/dist/core/data-loaders/cursor-data-loader.svelte.d.ts +14 -0
- package/dist/core/data-loaders/cursor-data-loader.svelte.js +35 -0
- package/dist/core/data-loaders/data-loader.d.ts +4 -0
- package/dist/core/data-loaders/data-loader.js +1 -0
- package/dist/core/data-loaders/index.d.ts +2 -0
- package/dist/core/data-loaders/index.js +1 -0
- package/dist/core/deferred.d.ts +6 -0
- package/dist/core/deferred.js +13 -0
- package/dist/core/graphql.d.ts +1 -0
- package/dist/core/graphql.js +10 -0
- package/dist/core/media/image-helper.d.ts +10 -0
- package/dist/core/media/image-helper.js +30 -0
- package/dist/core/media/images-size-detector.service.d.ts +6 -0
- package/dist/core/media/images-size-detector.service.js +15 -0
- package/dist/core/media/index.d.ts +4 -0
- package/dist/core/media/index.js +4 -0
- package/dist/core/media/media-item-url.service.d.ts +2 -0
- package/dist/core/media/media-item-url.service.js +2 -0
- package/dist/core/media/types.d.ts +28 -0
- package/dist/core/media/types.js +19 -0
- package/dist/core/toastr.d.ts +1 -0
- package/dist/core/toastr.js +26 -0
- package/dist/core/transitions/index.d.ts +1 -0
- package/dist/core/transitions/index.js +1 -0
- package/dist/core/transitions/slide-horizontally.d.ts +7 -0
- package/dist/core/transitions/slide-horizontally.js +55 -0
- package/dist/core/utils/array-helper.d.ts +23 -0
- package/dist/core/utils/array-helper.js +148 -0
- package/dist/core/utils/date-helper.d.ts +29 -0
- package/dist/core/utils/date-helper.js +146 -0
- package/dist/core/utils/dom-helper.d.ts +12 -0
- package/dist/core/utils/dom-helper.js +76 -0
- package/dist/core/utils/html-helper.d.ts +40 -0
- package/dist/core/utils/html-helper.js +97 -0
- package/dist/core/utils/index.d.ts +3 -0
- package/dist/core/utils/index.js +3 -0
- package/dist/core/utils/number-helper.d.ts +6 -0
- package/dist/core/utils/number-helper.js +28 -0
- package/dist/core/utils/string-generator.d.ts +2 -0
- package/dist/core/utils/string-generator.js +15 -0
- package/dist/core/utils/string-helper.d.ts +10 -0
- package/dist/core/utils/string-helper.js +53 -0
- package/dist/core/utils/url-helper.d.ts +3 -0
- package/dist/core/utils/url-helper.js +13 -0
- package/dist/core/utils/utils.d.ts +28 -0
- package/dist/core/utils/utils.js +100 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +4 -0
- package/dist/products/index.d.ts +1 -0
- package/dist/products/index.js +1 -0
- package/dist/products/price-helper.d.ts +4 -0
- package/dist/products/price-helper.js +36 -0
- package/dist/products/product-card/cmp.product-card.svelte +121 -0
- package/dist/products/product-card/cmp.product-card.svelte.d.ts +10 -0
- package/dist/products/product-card/index.d.ts +3 -0
- package/dist/products/product-card/index.js +3 -0
- package/dist/products/product-card/mapper.d.ts +3 -0
- package/dist/products/product-card/mapper.js +14 -0
- package/dist/products/product-card/operations.generated.d.ts +22 -0
- package/dist/products/product-card/operations.generated.js +65 -0
- package/dist/products/product-card/operations.graphql +19 -0
- package/dist/products/product-card/product-card-localization.svelte.d.ts +7 -0
- package/dist/products/product-card/product-card-localization.svelte.js +11 -0
- package/dist/products/product-card/types.d.ts +10 -0
- package/dist/products/product-card/types.js +1 -0
- package/dist/products/types.d.ts +5 -0
- package/dist/products/types.js +6 -0
- package/dist/short-videos/short-video-viewer/cmp.attachments.svelte +71 -0
- package/dist/short-videos/short-video-viewer/cmp.attachments.svelte.d.ts +7 -0
- package/dist/short-videos/short-video-viewer/cmp.short-video-details.svelte +145 -0
- package/dist/short-videos/short-video-viewer/cmp.short-video-details.svelte.d.ts +10 -0
- package/dist/short-videos/short-video-viewer/cmp.short-video-heading.svelte +86 -0
- package/dist/short-videos/short-video-viewer/cmp.short-video-heading.svelte.d.ts +9 -0
- package/dist/short-videos/short-video-viewer/cmp.short-video-viewer.svelte +133 -0
- package/dist/short-videos/short-video-viewer/cmp.short-video-viewer.svelte.d.ts +12 -0
- package/dist/short-videos/short-video-viewer/description.svelte +46 -0
- package/dist/short-videos/short-video-viewer/description.svelte.d.ts +9 -0
- package/dist/short-videos/short-video-viewer/index.d.ts +6 -0
- package/dist/short-videos/short-video-viewer/index.js +4 -0
- package/dist/short-videos/short-video-viewer/mapper.d.ts +3 -0
- package/dist/short-videos/short-video-viewer/mapper.js +28 -0
- package/dist/short-videos/short-video-viewer/operations.generated.d.ts +56 -0
- package/dist/short-videos/short-video-viewer/operations.generated.js +187 -0
- package/dist/short-videos/short-video-viewer/operations.graphql +26 -0
- package/dist/short-videos/short-video-viewer/short-video-details-localization.svelte.d.ts +14 -0
- package/dist/short-videos/short-video-viewer/short-video-details-localization.svelte.js +21 -0
- package/dist/short-videos/short-video-viewer/short-video-viewer-localization.svelte.d.ts +10 -0
- package/dist/short-videos/short-video-viewer/short-video-viewer-localization.svelte.js +13 -0
- package/dist/short-videos/short-video-viewer/types.d.ts +17 -0
- package/dist/short-videos/short-video-viewer/types.js +1 -0
- package/dist/short-videos/short-video-viewer/ui-manager.svelte.d.ts +12 -0
- package/dist/short-videos/short-video-viewer/ui-manager.svelte.js +26 -0
- package/dist/short-videos/short-videos-player/action-button.svelte +38 -0
- package/dist/short-videos/short-videos-player/action-button.svelte.d.ts +10 -0
- package/dist/short-videos/short-videos-player/cmp.short-videos-player.svelte +91 -0
- package/dist/short-videos/short-videos-player/cmp.short-videos-player.svelte.d.ts +13 -0
- package/dist/short-videos/short-videos-player/controls.svelte +215 -0
- package/dist/short-videos/short-videos-player/controls.svelte.d.ts +15 -0
- package/dist/short-videos/short-videos-player/index.d.ts +2 -0
- package/dist/short-videos/short-videos-player/index.js +1 -0
- package/dist/short-videos/short-videos-player/short-videos-player-localization.svelte.d.ts +14 -0
- package/dist/short-videos/short-videos-player/short-videos-player-localization.svelte.js +21 -0
- package/dist/short-videos/short-videos-player/ui-manager.svelte.d.ts +16 -0
- package/dist/short-videos/short-videos-player/ui-manager.svelte.js +25 -0
- package/dist/short-videos/short-videos-player-modal/cmp.short-videos-player-modal.svelte +485 -0
- package/dist/short-videos/short-videos-player-modal/cmp.short-videos-player-modal.svelte.d.ts +3 -0
- package/dist/short-videos/short-videos-player-modal/index.d.ts +79 -0
- package/dist/short-videos/short-videos-player-modal/index.js +78 -0
- package/dist/short-videos/short-videos-player-modal/short-videos-player-modal-state.svelte.d.ts +16 -0
- package/dist/short-videos/short-videos-player-modal/short-videos-player-modal-state.svelte.js +13 -0
- package/dist/streams/components/cmp.stream-page-component.svelte +16 -0
- package/dist/streams/components/cmp.stream-page-component.svelte.d.ts +10 -0
- package/dist/streams/components/components.factory.d.ts +22 -0
- package/dist/streams/components/components.factory.js +34 -0
- package/dist/streams/components/images/cmp.images-component.svelte +7 -0
- package/dist/streams/components/images/cmp.images-component.svelte.d.ts +7 -0
- package/dist/streams/components/images/index.d.ts +2 -0
- package/dist/streams/components/images/index.js +1 -0
- package/dist/streams/components/images/types.d.ts +8 -0
- package/dist/streams/components/images/types.js +5 -0
- package/dist/streams/components/index.d.ts +7 -0
- package/dist/streams/components/index.js +6 -0
- package/dist/streams/components/mapper.d.ts +3 -0
- package/dist/streams/components/mapper.js +43 -0
- package/dist/streams/components/operations.generated.d.ts +178 -0
- package/dist/streams/components/operations.generated.js +653 -0
- package/dist/streams/components/operations.graphql +35 -0
- package/dist/streams/components/product/cmp.product-component.svelte +148 -0
- package/dist/streams/components/product/cmp.product-component.svelte.d.ts +8 -0
- package/dist/streams/components/product/index.d.ts +3 -0
- package/dist/streams/components/product/index.js +2 -0
- package/dist/streams/components/product/mapper.d.ts +3 -0
- package/dist/streams/components/product/mapper.js +14 -0
- package/dist/streams/components/product/operations.generated.d.ts +22 -0
- package/dist/streams/components/product/operations.generated.js +53 -0
- package/dist/streams/components/product/operations.graphql +19 -0
- package/dist/streams/components/product/types.d.ts +10 -0
- package/dist/streams/components/product/types.js +1 -0
- package/dist/streams/components/short-video/cmp.short-video-component.svelte +9 -0
- package/dist/streams/components/short-video/cmp.short-video-component.svelte.d.ts +10 -0
- package/dist/streams/components/short-video/index.d.ts +3 -0
- package/dist/streams/components/short-video/index.js +2 -0
- package/dist/streams/components/short-video/mapper.d.ts +3 -0
- package/dist/streams/components/short-video/mapper.js +4 -0
- package/dist/streams/components/short-video/operations.generated.d.ts +56 -0
- package/dist/streams/components/short-video/operations.generated.js +193 -0
- package/dist/streams/components/short-video/operations.graphql +3 -0
- package/dist/streams/components/short-video/types.d.ts +2 -0
- package/dist/streams/components/short-video/types.js +1 -0
- package/dist/streams/components/stream-components-localization.svelte.d.ts +10 -0
- package/dist/streams/components/stream-components-localization.svelte.js +13 -0
- package/dist/streams/components/types.d.ts +27 -0
- package/dist/streams/components/types.js +6 -0
- package/dist/streams/slots/cmp.stream-component-slot.svelte +35 -0
- package/dist/streams/slots/cmp.stream-component-slot.svelte.d.ts +9 -0
- package/dist/streams/slots/index.d.ts +3 -0
- package/dist/streams/slots/index.js +2 -0
- package/dist/streams/slots/mapper.d.ts +3 -0
- package/dist/streams/slots/mapper.js +18 -0
- package/dist/streams/slots/operations.generated.d.ts +17 -0
- package/dist/streams/slots/operations.generated.js +34 -0
- package/dist/streams/slots/operations.graphql +14 -0
- package/dist/streams/slots/styles-transformer.d.ts +6 -0
- package/dist/streams/slots/styles-transformer.js +12 -0
- package/dist/streams/slots/types.d.ts +16 -0
- package/dist/streams/slots/types.js +1 -0
- package/dist/streams/stream-page-viewer/cmp.stream-page-viewer.svelte +47 -0
- package/dist/streams/stream-page-viewer/cmp.stream-page-viewer.svelte.d.ts +9 -0
- package/dist/streams/stream-page-viewer/index.d.ts +2 -0
- package/dist/streams/stream-page-viewer/index.js +1 -0
- package/dist/streams/stream-page-viewer/mapper.d.ts +3 -0
- package/dist/streams/stream-page-viewer/mapper.js +23 -0
- package/dist/streams/stream-page-viewer/operations.generated.d.ts +113 -0
- package/dist/streams/stream-page-viewer/operations.generated.js +400 -0
- package/dist/streams/stream-page-viewer/operations.graphql +13 -0
- package/dist/streams/stream-page-viewer/stream-page-viewer-localization.svelte.d.ts +10 -0
- package/dist/streams/stream-page-viewer/stream-page-viewer-localization.svelte.js +13 -0
- package/dist/streams/stream-page-viewer/types.d.ts +18 -0
- package/dist/streams/stream-page-viewer/types.js +1 -0
- package/dist/streams/stream-player/action-button.svelte +38 -0
- package/dist/streams/stream-player/action-button.svelte.d.ts +10 -0
- package/dist/streams/stream-player/cmp.stream-player.svelte +141 -0
- package/dist/streams/stream-player/cmp.stream-player.svelte.d.ts +16 -0
- package/dist/streams/stream-player/controls.svelte +222 -0
- package/dist/streams/stream-player/controls.svelte.d.ts +14 -0
- package/dist/streams/stream-player/index.d.ts +2 -0
- package/dist/streams/stream-player/index.js +1 -0
- package/dist/streams/stream-player/mapper.d.ts +3 -0
- package/dist/streams/stream-player/mapper.js +15 -0
- package/dist/streams/stream-player/operations.generated.d.ts +161 -0
- package/dist/streams/stream-player/operations.generated.js +559 -0
- package/dist/streams/stream-player/operations.graphql +32 -0
- package/dist/streams/stream-player/stream-overview.svelte +239 -0
- package/dist/streams/stream-player/stream-overview.svelte.d.ts +17 -0
- package/dist/streams/stream-player/stream-player-buffer.svelte.d.ts +25 -0
- package/dist/streams/stream-player/stream-player-buffer.svelte.js +84 -0
- package/dist/streams/stream-player/stream-player-localization.svelte.d.ts +18 -0
- package/dist/streams/stream-player/stream-player-localization.svelte.js +29 -0
- package/dist/streams/stream-player/types.d.ts +12 -0
- package/dist/streams/stream-player/types.js +1 -0
- package/dist/streams/stream-player/ui-manager.svelte.d.ts +17 -0
- package/dist/streams/stream-player/ui-manager.svelte.js +26 -0
- package/dist/streams/stream-player-modal/cmp.stream-player-modal.svelte +486 -0
- package/dist/streams/stream-player-modal/cmp.stream-player-modal.svelte.d.ts +3 -0
- package/dist/streams/stream-player-modal/index.d.ts +79 -0
- package/dist/streams/stream-player-modal/index.js +78 -0
- package/dist/streams/stream-player-modal/stream-player-modal-state.svelte.d.ts +17 -0
- package/dist/streams/stream-player-modal/stream-player-modal-state.svelte.js +14 -0
- package/dist/ui/button/cmp.button.svelte +10 -0
- package/dist/ui/button/cmp.button.svelte.d.ts +16 -0
- package/dist/ui/button/index.d.ts +2 -0
- package/dist/ui/button/index.js +2 -0
- package/dist/ui/button/resources/button-base.svelte +84 -0
- package/dist/ui/button/resources/button-base.svelte.d.ts +13 -0
- package/dist/ui/button/resources/button-theme.svelte +204 -0
- package/dist/ui/button/resources/button-theme.svelte.d.ts +10 -0
- package/dist/ui/button/resources/button-types.d.ts +21 -0
- package/dist/ui/button/resources/button-types.js +23 -0
- package/dist/ui/dynamic-component/cmp.dynamic-component.svelte +5 -0
- package/dist/ui/dynamic-component/cmp.dynamic-component.svelte.d.ts +7 -0
- package/dist/ui/dynamic-component/index.d.ts +2 -0
- package/dist/ui/dynamic-component/index.js +2 -0
- package/dist/ui/dynamic-component/types.svelte.d.ts +11 -0
- package/dist/ui/dynamic-component/types.svelte.js +13 -0
- package/dist/ui/icon/cmp.icon.svelte +113 -0
- package/dist/ui/icon/cmp.icon.svelte.d.ts +8 -0
- package/dist/ui/icon/index.d.ts +2 -0
- package/dist/ui/icon/index.js +2 -0
- package/dist/ui/icon/types.d.ts +9 -0
- package/dist/ui/icon/types.js +10 -0
- package/dist/ui/image/cmp.image-round.svelte +41 -0
- package/dist/ui/image/cmp.image-round.svelte.d.ts +11 -0
- package/dist/ui/image/cmp.image-rounded.svelte +71 -0
- package/dist/ui/image/cmp.image-rounded.svelte.d.ts +11 -0
- package/dist/ui/image/cmp.image-stub.svelte +34 -0
- package/dist/ui/image/cmp.image-stub.svelte.d.ts +18 -0
- package/dist/ui/image/cmp.image.svelte +82 -0
- package/dist/ui/image/cmp.image.svelte.d.ts +13 -0
- package/dist/ui/image/image-state.d.ts +6 -0
- package/dist/ui/image/image-state.js +17 -0
- package/dist/ui/image/index.d.ts +4 -0
- package/dist/ui/image/index.js +4 -0
- package/dist/ui/infinite-scrolling/cmp.infinite-scrolling.svelte +84 -0
- package/dist/ui/infinite-scrolling/cmp.infinite-scrolling.svelte.d.ts +11 -0
- package/dist/ui/infinite-scrolling/index.d.ts +1 -0
- package/dist/ui/infinite-scrolling/index.js +1 -0
- package/dist/ui/line-clamp/cmp.line-clamp.svelte +89 -0
- package/dist/ui/line-clamp/cmp.line-clamp.svelte.d.ts +12 -0
- package/dist/ui/line-clamp/index.d.ts +2 -0
- package/dist/ui/line-clamp/index.js +2 -0
- package/dist/ui/line-clamp/line-clamp-localization.svelte.d.ts +9 -0
- package/dist/ui/line-clamp/line-clamp-localization.svelte.js +15 -0
- package/dist/ui/line-clamp/line-clamp-types.d.ts +3 -0
- package/dist/ui/line-clamp/line-clamp-types.js +1 -0
- package/dist/ui/line-clamp/line-clamp-utils.d.ts +8 -0
- package/dist/ui/line-clamp/line-clamp-utils.js +33 -0
- package/dist/ui/loading/cmp.loading.svelte +97 -0
- package/dist/ui/loading/cmp.loading.svelte.d.ts +9 -0
- package/dist/ui/loading/index.d.ts +1 -0
- package/dist/ui/loading/index.js +1 -0
- package/dist/ui/media-item-view/cmp.media-item-view.svelte +90 -0
- package/dist/ui/media-item-view/cmp.media-item-view.svelte.d.ts +12 -0
- package/dist/ui/media-item-view/index.d.ts +1 -0
- package/dist/ui/media-item-view/index.js +1 -0
- package/dist/ui/media-items-gallery/cmp.media-items-gallery.svelte +277 -0
- package/dist/ui/media-items-gallery/cmp.media-items-gallery.svelte.d.ts +12 -0
- package/dist/ui/media-items-gallery/index.d.ts +1 -0
- package/dist/ui/media-items-gallery/index.js +1 -0
- package/dist/ui/media-items-gallery/types.d.ts +12 -0
- package/dist/ui/media-items-gallery/types.js +35 -0
- package/dist/ui/media-playback/index.d.ts +2 -0
- package/dist/ui/media-playback/index.js +2 -0
- package/dist/ui/media-playback/playback-manager.svelte.d.ts +25 -0
- package/dist/ui/media-playback/playback-manager.svelte.js +62 -0
- package/dist/ui/media-playback/volume-manager.svelte.d.ts +10 -0
- package/dist/ui/media-playback/volume-manager.svelte.js +27 -0
- package/dist/ui/player/cmp.player-slider.svelte +161 -0
- package/dist/ui/player/cmp.player-slider.svelte.d.ts +33 -0
- package/dist/ui/player/index.d.ts +4 -0
- package/dist/ui/player/index.js +3 -0
- package/dist/ui/player/player-buffer.svelte.d.ts +28 -0
- package/dist/ui/player/player-buffer.svelte.js +64 -0
- package/dist/ui/player/prevent-slider-scroll.d.ts +5 -0
- package/dist/ui/player/prevent-slider-scroll.js +11 -0
- package/dist/ui/player/types.d.ts +14 -0
- package/dist/ui/player/types.js +1 -0
- package/dist/ui/progress/cmp.progress.svelte +37 -0
- package/dist/ui/progress/cmp.progress.svelte.d.ts +6 -0
- package/dist/ui/progress/index.d.ts +1 -0
- package/dist/ui/progress/index.js +1 -0
- package/dist/ui/proportional-container/cmp.proportional-container.svelte +39 -0
- package/dist/ui/proportional-container/cmp.proportional-container.svelte.d.ts +8 -0
- package/dist/ui/proportional-container/index.d.ts +1 -0
- package/dist/ui/proportional-container/index.js +1 -0
- package/dist/ui/seek-bar/cmp.seek-bar.svelte +63 -0
- package/dist/ui/seek-bar/cmp.seek-bar.svelte.d.ts +12 -0
- package/dist/ui/seek-bar/index.d.ts +1 -0
- package/dist/ui/seek-bar/index.js +1 -0
- package/dist/ui/shadow-dom/cmp.shadow-dom.svelte +26 -0
- package/dist/ui/shadow-dom/cmp.shadow-dom.svelte.d.ts +7 -0
- package/dist/ui/shadow-dom/index.d.ts +1 -0
- package/dist/ui/shadow-dom/index.js +1 -0
- package/dist/ui/spotlight-layout/cmp.spotlight-layout.svelte +120 -0
- package/dist/ui/spotlight-layout/cmp.spotlight-layout.svelte.d.ts +18 -0
- package/dist/ui/spotlight-layout/index.d.ts +1 -0
- package/dist/ui/spotlight-layout/index.js +1 -0
- package/dist/ui/time-ago/cmp.time-ago.svelte +69 -0
- package/dist/ui/time-ago/cmp.time-ago.svelte.d.ts +9 -0
- package/dist/ui/time-ago/index.d.ts +2 -0
- package/dist/ui/time-ago/index.js +1 -0
- package/dist/ui/time-ago/time-ago-localization.svelte.d.ts +21 -0
- package/dist/ui/time-ago/time-ago-localization.svelte.js +39 -0
- package/dist/ui/video/cmp.video.svelte +377 -0
- package/dist/ui/video/cmp.video.svelte.d.ts +24 -0
- package/dist/ui/video/index.d.ts +1 -0
- package/dist/ui/video/index.js +1 -0
- package/package.json +89 -0
|
@@ -0,0 +1,84 @@
|
|
|
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>
|
|
@@ -0,0 +1,13 @@
|
|
|
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;
|
|
@@ -0,0 +1,204 @@
|
|
|
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--black={style === ButtonStyle.Black}
|
|
14
|
+
class:button-theme--text-only={style === ButtonStyle.TextOnly}
|
|
15
|
+
class:button-theme--transparent-success={style === ButtonStyle.TransparentSuccess}
|
|
16
|
+
class:button-theme--transparent-primary={style === ButtonStyle.TransparentPrimary}
|
|
17
|
+
class:button-theme--transparent-gray={style === ButtonStyle.TransparentGray}
|
|
18
|
+
class:button-theme--transparent-white={style === ButtonStyle.TransparentWhite}
|
|
19
|
+
class:button-theme--transparent-warning={style === ButtonStyle.TransparentWarning}
|
|
20
|
+
class:button-theme--transparent-destructive={style === ButtonStyle.TransparentDestructive}
|
|
21
|
+
class:button-theme--size-standard={size === ButtonSize.Standard}
|
|
22
|
+
class:button-theme--size-large={size === ButtonSize.Large}
|
|
23
|
+
class:button-theme--size-small={size === ButtonSize.Small}>
|
|
24
|
+
{@render children()}
|
|
25
|
+
</div>
|
|
26
|
+
|
|
27
|
+
<style>@keyframes fadeIn {
|
|
28
|
+
0% {
|
|
29
|
+
opacity: 1;
|
|
30
|
+
}
|
|
31
|
+
50% {
|
|
32
|
+
opacity: 0.4;
|
|
33
|
+
}
|
|
34
|
+
100% {
|
|
35
|
+
opacity: 1;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
.button-theme {
|
|
39
|
+
/*Style*/
|
|
40
|
+
/*Size*/
|
|
41
|
+
}
|
|
42
|
+
.button-theme--primary {
|
|
43
|
+
--button--font--color: #ffffff;
|
|
44
|
+
--button--background: #144ab0;
|
|
45
|
+
--button--background--hover: #1244a0;
|
|
46
|
+
--button--background--active: #103a89;
|
|
47
|
+
--button--background--disabled: #91b3f3;
|
|
48
|
+
}
|
|
49
|
+
:global([data-theme="dark"]) .button-theme--primary {
|
|
50
|
+
--button--background--disabled: #91b3f3;
|
|
51
|
+
}
|
|
52
|
+
.button-theme--standard {
|
|
53
|
+
--button--font--color: #2e2e2e;
|
|
54
|
+
--button--background: #ffffff;
|
|
55
|
+
--button--background--hover: #f9fafb;
|
|
56
|
+
--button--background--active: #f3f4f6;
|
|
57
|
+
--button--background--disabled: #f3f4f6;
|
|
58
|
+
--button--border: 1px solid #e5e7eb;
|
|
59
|
+
}
|
|
60
|
+
:global([data-theme="dark"]) .button-theme--standard {
|
|
61
|
+
--button--font--color: #ffffff;
|
|
62
|
+
--button--background: #111827;
|
|
63
|
+
--button--background--hover: #1f2937;
|
|
64
|
+
--button--background--active: #374151;
|
|
65
|
+
--button--background--disabled: #374151;
|
|
66
|
+
}
|
|
67
|
+
:global([data-theme="dark"]) .button-theme--standard {
|
|
68
|
+
--button--border: 1px solid #4b5563;
|
|
69
|
+
}
|
|
70
|
+
.button-theme--white {
|
|
71
|
+
--button--font--color: #2e2e2e;
|
|
72
|
+
--button--background: #ffffff;
|
|
73
|
+
--button--background--hover: #f9fafb;
|
|
74
|
+
--button--background--active: #f3f4f6;
|
|
75
|
+
--button--background--disabled: #f3f4f6;
|
|
76
|
+
}
|
|
77
|
+
:global([data-theme="dark"]) .button-theme--white {
|
|
78
|
+
--button--font--color: #ffffff;
|
|
79
|
+
--button--background: #111827;
|
|
80
|
+
--button--background--hover: #1f2937;
|
|
81
|
+
--button--background--active: #374151;
|
|
82
|
+
--button--background--disabled: #374151;
|
|
83
|
+
}
|
|
84
|
+
.button-theme--gray {
|
|
85
|
+
--button--font--color: #2e2e2e;
|
|
86
|
+
--button--background: #f3f4f6;
|
|
87
|
+
--button--background--hover: #f9fafb;
|
|
88
|
+
--button--background--active: #f3f4f6;
|
|
89
|
+
--button--background--disabled: #f3f4f6;
|
|
90
|
+
--button--border: 1px solid #e5e7eb;
|
|
91
|
+
}
|
|
92
|
+
:global([data-theme="dark"]) .button-theme--gray {
|
|
93
|
+
--button--font--color: #ffffff;
|
|
94
|
+
--button--background: #374151;
|
|
95
|
+
--button--background--hover: #1f2937;
|
|
96
|
+
--button--background--active: #374151;
|
|
97
|
+
--button--background--disabled: #374151;
|
|
98
|
+
--button--border: 1px solid #4b5563;
|
|
99
|
+
}
|
|
100
|
+
.button-theme--green {
|
|
101
|
+
--button--font--color: #0cce6b;
|
|
102
|
+
--button--background: #066031;
|
|
103
|
+
--button--background--hover: #088745;
|
|
104
|
+
--button--background--active: #088745;
|
|
105
|
+
--button--background--disabled: #0aa454;
|
|
106
|
+
--button--border: 1px solid #066031;
|
|
107
|
+
}
|
|
108
|
+
:global([data-theme="dark"]) .button-theme--green {
|
|
109
|
+
--button--font--color: #ffffff;
|
|
110
|
+
--button--background: #374151;
|
|
111
|
+
--button--background--hover: #1f2937;
|
|
112
|
+
--button--background--active: #374151;
|
|
113
|
+
--button--background--disabled: #374151;
|
|
114
|
+
--button--border: 1px solid #4b5563;
|
|
115
|
+
}
|
|
116
|
+
.button-theme--black {
|
|
117
|
+
--button--font--color: #ffffff;
|
|
118
|
+
--button--background: #1c1c1c;
|
|
119
|
+
--button--background--hover: #1f2937;
|
|
120
|
+
--button--background--active: #374151;
|
|
121
|
+
--button--background--disabled: #374151;
|
|
122
|
+
}
|
|
123
|
+
:global([data-theme="dark"]) .button-theme--black {
|
|
124
|
+
--button--font--color: #2e2e2e;
|
|
125
|
+
--button--background: #fafafa;
|
|
126
|
+
--button--background--hover: #f3f4f6;
|
|
127
|
+
--button--background--active: #e5e7eb;
|
|
128
|
+
--button--background--disabled: #e5e7eb;
|
|
129
|
+
}
|
|
130
|
+
.button-theme--alert {
|
|
131
|
+
--button--font--color: #ffffff;
|
|
132
|
+
--button--background: #e71d36;
|
|
133
|
+
--button--background--hover: #d4172d;
|
|
134
|
+
--button--background--active: #b81427;
|
|
135
|
+
--button--background--disabled: #f6a7b1;
|
|
136
|
+
}
|
|
137
|
+
.button-theme--text-only {
|
|
138
|
+
--button--font--color: #2e2e2e;
|
|
139
|
+
--button--background: transparent;
|
|
140
|
+
--button--background--hover: #f3f4f6;
|
|
141
|
+
--button--background--active: #e5e7eb;
|
|
142
|
+
--button--border: none;
|
|
143
|
+
}
|
|
144
|
+
:global([data-theme="dark"]) .button-theme--text-only {
|
|
145
|
+
--button--font--color: #ffffff;
|
|
146
|
+
--button--background--hover: #111827;
|
|
147
|
+
--button--background--active: #1f2937;
|
|
148
|
+
--button--border: none;
|
|
149
|
+
}
|
|
150
|
+
.button-theme--transparent-success {
|
|
151
|
+
--button--font--color: #0cce6b;
|
|
152
|
+
--button--background: #ecfef4;
|
|
153
|
+
--button--border: 1px solid #0cce6b;
|
|
154
|
+
--button--background--active: #d4fce7;
|
|
155
|
+
}
|
|
156
|
+
.button-theme--transparent-primary {
|
|
157
|
+
--button--font--color: #144ab0;
|
|
158
|
+
--button--background: #f1f6fd;
|
|
159
|
+
--button--border: 1px solid #144ab0;
|
|
160
|
+
--button--background--active: #dfe9fb;
|
|
161
|
+
}
|
|
162
|
+
.button-theme--transparent-white {
|
|
163
|
+
--button--font--color: #ffffff;
|
|
164
|
+
--button--background: transparent;
|
|
165
|
+
--button--border: 1px solid #ffffff;
|
|
166
|
+
}
|
|
167
|
+
.button-theme--transparent-gray {
|
|
168
|
+
--button--font--color: #6b7280;
|
|
169
|
+
--button--background: #f9fafb;
|
|
170
|
+
--button--border: 1px solid #6b7280;
|
|
171
|
+
--button--background--active: #f3f4f6;
|
|
172
|
+
}
|
|
173
|
+
:global([data-theme="dark"]) .button-theme--transparent-gray {
|
|
174
|
+
--button--font--color: #e5e7eb;
|
|
175
|
+
--button--background: #1f2937;
|
|
176
|
+
--button--border: 1px solid #e5e7eb;
|
|
177
|
+
--button--background--active: #374151;
|
|
178
|
+
}
|
|
179
|
+
.button-theme--transparent-warning {
|
|
180
|
+
--button--font--color: #ffa62b;
|
|
181
|
+
--button--background: #fffbeb;
|
|
182
|
+
--button--border: 1px solid #ffa62b;
|
|
183
|
+
--button--background--active: #fef3c7;
|
|
184
|
+
}
|
|
185
|
+
.button-theme--transparent-destructive {
|
|
186
|
+
--button--font--color: #e71d36;
|
|
187
|
+
--button--background: #fef1f3;
|
|
188
|
+
--button--border: 1px solid #e71d36;
|
|
189
|
+
--button--background--active: #fde8ea;
|
|
190
|
+
}
|
|
191
|
+
.button-theme--size-standard {
|
|
192
|
+
--button--height: 2em;
|
|
193
|
+
--button--text--font-size: 0.75em;
|
|
194
|
+
}
|
|
195
|
+
.button-theme--size-large {
|
|
196
|
+
--button--height: 3em;
|
|
197
|
+
--button--font-weight: 500;
|
|
198
|
+
--icon--stroke-width: 0.4;
|
|
199
|
+
--button--text--font-size: 0.9375em;
|
|
200
|
+
}
|
|
201
|
+
.button-theme--size-small {
|
|
202
|
+
--button--height: 1.5em;
|
|
203
|
+
--button--text--font-size: 0.625em;
|
|
204
|
+
}</style>
|
|
@@ -0,0 +1,10 @@
|
|
|
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;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export declare enum ButtonStyle {
|
|
2
|
+
Primary = "primary",
|
|
3
|
+
Standard = "standard",
|
|
4
|
+
Alert = "alert",
|
|
5
|
+
White = "white",
|
|
6
|
+
Gray = "gray",
|
|
7
|
+
Green = "green",
|
|
8
|
+
Black = "black",
|
|
9
|
+
TextOnly = "text-only",
|
|
10
|
+
TransparentSuccess = "transparent-success",
|
|
11
|
+
TransparentPrimary = "transparent-primary",
|
|
12
|
+
TransparentGray = "transparent-gray",
|
|
13
|
+
TransparentWhite = "transparent-white",
|
|
14
|
+
TransparentWarning = "transparent-warning",
|
|
15
|
+
TransparentDestructive = "transparent-destructive"
|
|
16
|
+
}
|
|
17
|
+
export declare enum ButtonSize {
|
|
18
|
+
Standard = "Standard",
|
|
19
|
+
Large = "Large",
|
|
20
|
+
Small = "Small"
|
|
21
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
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["Black"] = "black";
|
|
10
|
+
ButtonStyle["TextOnly"] = "text-only";
|
|
11
|
+
ButtonStyle["TransparentSuccess"] = "transparent-success";
|
|
12
|
+
ButtonStyle["TransparentPrimary"] = "transparent-primary";
|
|
13
|
+
ButtonStyle["TransparentGray"] = "transparent-gray";
|
|
14
|
+
ButtonStyle["TransparentWhite"] = "transparent-white";
|
|
15
|
+
ButtonStyle["TransparentWarning"] = "transparent-warning";
|
|
16
|
+
ButtonStyle["TransparentDestructive"] = "transparent-destructive";
|
|
17
|
+
})(ButtonStyle || (ButtonStyle = {}));
|
|
18
|
+
export var ButtonSize;
|
|
19
|
+
(function (ButtonSize) {
|
|
20
|
+
ButtonSize["Standard"] = "Standard";
|
|
21
|
+
ButtonSize["Large"] = "Large";
|
|
22
|
+
ButtonSize["Small"] = "Small";
|
|
23
|
+
})(ButtonSize || (ButtonSize = {}));
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Component } from 'svelte';
|
|
2
|
+
export type DynamicComponentProps<TComponent extends Component> = TComponent extends Component<infer Props> ? Props : never;
|
|
3
|
+
export declare class DynamicComponentModel<TComponent extends Component<any> = Component<any>> {
|
|
4
|
+
component: TComponent;
|
|
5
|
+
props: DynamicComponentProps<TComponent>;
|
|
6
|
+
constructor(init: {
|
|
7
|
+
component: TComponent;
|
|
8
|
+
props: DynamicComponentProps<TComponent>;
|
|
9
|
+
});
|
|
10
|
+
updateProps(props: Partial<DynamicComponentProps<TComponent>>): void;
|
|
11
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// Define the DynamicComponentModel class
|
|
2
|
+
/* eslint-disable-next-line @typescript-eslint/no-explicit-any */
|
|
3
|
+
export class DynamicComponentModel {
|
|
4
|
+
component;
|
|
5
|
+
props = $state(null);
|
|
6
|
+
constructor(init) {
|
|
7
|
+
this.component = init.component;
|
|
8
|
+
this.props = init.props;
|
|
9
|
+
}
|
|
10
|
+
updateProps(props) {
|
|
11
|
+
this.props = { ...this.props, ...props };
|
|
12
|
+
}
|
|
13
|
+
}
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
<script lang="ts">import { IconColor } from './types';
|
|
2
|
+
import { inlineSvg } from '@svelte-put/inline-svg';
|
|
3
|
+
let { src, color = null } = $props();
|
|
4
|
+
let svgRef;
|
|
5
|
+
$effect(() => {
|
|
6
|
+
if (svgRef && src) {
|
|
7
|
+
inlineSvg(svgRef, src);
|
|
8
|
+
}
|
|
9
|
+
});
|
|
10
|
+
const fillSvg = (node) => {
|
|
11
|
+
svgRef = node;
|
|
12
|
+
return inlineSvg(node, src);
|
|
13
|
+
};
|
|
14
|
+
</script>
|
|
15
|
+
|
|
16
|
+
<div style="display: contents">
|
|
17
|
+
{#if src.startsWith('fa-')}
|
|
18
|
+
<i class="{src} font-awesome-icon-to-replace"></i>
|
|
19
|
+
{:else}
|
|
20
|
+
<svg
|
|
21
|
+
class="icon"
|
|
22
|
+
use:fillSvg
|
|
23
|
+
class:icon--white={color === IconColor.White}
|
|
24
|
+
class:icon--text={color === IconColor.Text}
|
|
25
|
+
class:icon--gray={color === IconColor.Gray}
|
|
26
|
+
class:icon--green={color === IconColor.Green}
|
|
27
|
+
class:icon--red={color === IconColor.Red}
|
|
28
|
+
class:icon--orange={color === IconColor.Orange}
|
|
29
|
+
class:icon--blue={color === IconColor.Blue}></svg>
|
|
30
|
+
{/if}
|
|
31
|
+
</div>
|
|
32
|
+
|
|
33
|
+
<style>@keyframes fadeIn {
|
|
34
|
+
0% {
|
|
35
|
+
opacity: 1;
|
|
36
|
+
}
|
|
37
|
+
50% {
|
|
38
|
+
opacity: 0.4;
|
|
39
|
+
}
|
|
40
|
+
100% {
|
|
41
|
+
opacity: 1;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
.icon {
|
|
45
|
+
--_icon--color: var(--icon--color);
|
|
46
|
+
--_icon--size: var(--icon--size, 1.25em);
|
|
47
|
+
--_icon--stroke-width: var(--icon--stroke-width, 0);
|
|
48
|
+
display: inline-block;
|
|
49
|
+
color: inherit;
|
|
50
|
+
fill: var(--_icon--color, currentColor);
|
|
51
|
+
height: var(--_icon--size);
|
|
52
|
+
min-height: var(--_icon--size);
|
|
53
|
+
max-height: var(--_icon--size);
|
|
54
|
+
width: var(--_icon--size);
|
|
55
|
+
min-width: var(--_icon--size);
|
|
56
|
+
max-width: var(--_icon--size);
|
|
57
|
+
}
|
|
58
|
+
.icon--white {
|
|
59
|
+
--_icon--color: #ffffff;
|
|
60
|
+
}
|
|
61
|
+
:global([data-theme="dark"]) .icon--white {
|
|
62
|
+
--_icon--color: #ffffff;
|
|
63
|
+
}
|
|
64
|
+
.icon--text {
|
|
65
|
+
--_icon--color: #2e2e2e;
|
|
66
|
+
}
|
|
67
|
+
:global([data-theme="dark"]) .icon--text {
|
|
68
|
+
--_icon--color: #ffffff;
|
|
69
|
+
}
|
|
70
|
+
.icon--gray {
|
|
71
|
+
--_icon--color: #6b7280;
|
|
72
|
+
}
|
|
73
|
+
:global([data-theme="dark"]) .icon--gray {
|
|
74
|
+
--_icon--color: #6b7280;
|
|
75
|
+
}
|
|
76
|
+
.icon--green {
|
|
77
|
+
--_icon--color: #0cce6b;
|
|
78
|
+
}
|
|
79
|
+
:global([data-theme="dark"]) .icon--green {
|
|
80
|
+
--_icon--color: #0cce6b;
|
|
81
|
+
}
|
|
82
|
+
.icon--red {
|
|
83
|
+
--_icon--color: #e71d36;
|
|
84
|
+
}
|
|
85
|
+
:global([data-theme="dark"]) .icon--red {
|
|
86
|
+
--_icon--color: #e71d36;
|
|
87
|
+
}
|
|
88
|
+
.icon--orange {
|
|
89
|
+
--_icon--color: #ffa62b;
|
|
90
|
+
}
|
|
91
|
+
:global([data-theme="dark"]) .icon--orange {
|
|
92
|
+
--_icon--color: #ffa62b;
|
|
93
|
+
}
|
|
94
|
+
.icon--blue {
|
|
95
|
+
--_icon--color: #144ab0;
|
|
96
|
+
}
|
|
97
|
+
:global([data-theme="dark"]) .icon--blue {
|
|
98
|
+
--_icon--color: #91b3f3;
|
|
99
|
+
}
|
|
100
|
+
.icon :global(path) {
|
|
101
|
+
stroke: var(--_icon--color);
|
|
102
|
+
stroke-width: var(--_icon--stroke-width);
|
|
103
|
+
}
|
|
104
|
+
:global([data-theme="dark"]) .icon :global(path) {
|
|
105
|
+
stroke: var(--_icon--color);
|
|
106
|
+
stroke-width: var(--_icon--stroke-width);
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
.font-awesome-icon-to-replace {
|
|
110
|
+
font-size: 1em;
|
|
111
|
+
transform: scale(2);
|
|
112
|
+
color: red;
|
|
113
|
+
}</style>
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export var IconColor;
|
|
2
|
+
(function (IconColor) {
|
|
3
|
+
IconColor["White"] = "white";
|
|
4
|
+
IconColor["Blue"] = "blue";
|
|
5
|
+
IconColor["Green"] = "green";
|
|
6
|
+
IconColor["Gray"] = "gray";
|
|
7
|
+
IconColor["Orange"] = "orange";
|
|
8
|
+
IconColor["Red"] = "red";
|
|
9
|
+
IconColor["Text"] = "text";
|
|
10
|
+
})(IconColor || (IconColor = {}));
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
<script lang="ts">import RoundedImg from './cmp.image-rounded.svelte';
|
|
2
|
+
let { src, alt = '', noBorders = false, on } = $props();
|
|
3
|
+
</script>
|
|
4
|
+
|
|
5
|
+
<div class="round-img">
|
|
6
|
+
<div class="round-img__placer">
|
|
7
|
+
<RoundedImg src={src} alt={alt} noBorders={noBorders} on={on} />
|
|
8
|
+
</div>
|
|
9
|
+
</div>
|
|
10
|
+
|
|
11
|
+
<style>@keyframes fadeIn {
|
|
12
|
+
0% {
|
|
13
|
+
opacity: 1;
|
|
14
|
+
}
|
|
15
|
+
50% {
|
|
16
|
+
opacity: 0.4;
|
|
17
|
+
}
|
|
18
|
+
100% {
|
|
19
|
+
opacity: 1;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
.round-img {
|
|
23
|
+
--_image--round--size: var(--image--round--size, 100%);
|
|
24
|
+
--image--rounded--inner--border-radius: 50%;
|
|
25
|
+
--image--rounded--outer--border-radius: 50%;
|
|
26
|
+
--image--rounded--image--border-radius: 50%;
|
|
27
|
+
--image--rounded--width: 100%;
|
|
28
|
+
--image--rounded--height: 100%;
|
|
29
|
+
display: inline-block;
|
|
30
|
+
width: var(--_image--round--size);
|
|
31
|
+
position: relative;
|
|
32
|
+
padding-bottom: var(--_image--round--size);
|
|
33
|
+
}
|
|
34
|
+
.round-img__placer {
|
|
35
|
+
position: absolute;
|
|
36
|
+
position: absolute;
|
|
37
|
+
top: 0;
|
|
38
|
+
left: 0;
|
|
39
|
+
width: 100%;
|
|
40
|
+
height: 100%;
|
|
41
|
+
}</style>
|