@sima-land/moleculas 16.0.0-alpha.5 → 16.0.0-alpha.50
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/LICENSE +201 -0
- package/README.md +23 -0
- package/dist/common/components/badge/badge.d.ts +7 -0
- package/dist/common/components/badge/badge.js +42 -0
- package/dist/common/components/badge/badge.js.map +1 -0
- package/dist/common/components/badge/badge.module.scss +100 -0
- package/dist/common/components/badge/index.d.ts +2 -0
- package/dist/common/components/badge/index.js +6 -0
- package/dist/common/components/badge/index.js.map +1 -0
- package/dist/common/components/badge/types.d.ts +40 -0
- package/{common/components/intractive-image → dist/common/components/badge}/types.js +1 -0
- package/dist/common/components/badge/types.js.map +1 -0
- package/dist/common/components/badge/utils.d.ts +33 -0
- package/dist/common/components/badge/utils.js +112 -0
- package/dist/common/components/badge/utils.js.map +1 -0
- package/{common/components/badge-list/index.d.ts → dist/common/components/badge-list/badge-list.d.ts} +5 -5
- package/dist/common/components/badge-list/badge-list.js +38 -0
- package/dist/common/components/badge-list/badge-list.js.map +1 -0
- package/dist/common/components/badge-list/index.d.ts +1 -0
- package/dist/common/components/badge-list/index.js +6 -0
- package/dist/common/components/badge-list/index.js.map +1 -0
- package/dist/common/components/breadcrumbs/breadcrumbs.d.ts +46 -0
- package/dist/common/components/breadcrumbs/breadcrumbs.js +82 -0
- package/dist/common/components/breadcrumbs/breadcrumbs.js.map +1 -0
- package/dist/common/components/breadcrumbs/breadcrumbs.module.scss +113 -0
- package/dist/common/components/breadcrumbs/index.d.ts +2 -0
- package/dist/common/components/breadcrumbs/index.js +7 -0
- package/dist/common/components/breadcrumbs/index.js.map +1 -0
- package/dist/common/components/breadcrumbs/types.d.ts +8 -0
- package/{common/components/media-modal → dist/common/components/breadcrumbs}/types.js +1 -0
- package/dist/common/components/breadcrumbs/types.js.map +1 -0
- package/dist/common/components/hover-slider/hover-slider-nav.d.ts +7 -0
- package/dist/common/components/hover-slider/hover-slider-nav.js +20 -0
- package/dist/common/components/hover-slider/hover-slider-nav.js.map +1 -0
- package/dist/common/components/hover-slider/hover-slider-nav.module.scss +22 -0
- package/dist/common/components/hover-slider/hover-slider.d.ts +9 -0
- package/dist/common/components/hover-slider/hover-slider.js +95 -0
- package/dist/common/components/hover-slider/hover-slider.js.map +1 -0
- package/dist/common/components/hover-slider/hover-slider.module.scss +36 -0
- package/dist/common/components/hover-slider/index.d.ts +3 -0
- package/dist/common/components/hover-slider/index.js +9 -0
- package/dist/common/components/hover-slider/index.js.map +1 -0
- package/dist/common/components/hover-slider/types.d.ts +30 -0
- package/{common/components/product-info → dist/common/components/hover-slider}/types.js +1 -0
- package/dist/common/components/hover-slider/types.js.map +1 -0
- package/dist/common/components/hover-slider/utils.d.ts +13 -0
- package/dist/common/components/hover-slider/utils.js +36 -0
- package/dist/common/components/hover-slider/utils.js.map +1 -0
- package/dist/common/components/img-stub/img-stub.d.ts +14 -0
- package/dist/common/components/img-stub/img-stub.js +20 -0
- package/dist/common/components/img-stub/img-stub.js.map +1 -0
- package/dist/common/components/img-stub/img-stub.module.scss +36 -0
- package/dist/common/components/img-stub/index.d.ts +1 -0
- package/dist/common/components/img-stub/index.js +6 -0
- package/dist/common/components/img-stub/index.js.map +1 -0
- package/{common/components/intractive-image → dist/common/components/interactive-image}/index.js +1 -0
- package/dist/common/components/interactive-image/index.js.map +1 -0
- package/{common/components/intractive-image → dist/common/components/interactive-image}/interactive-image-util.scss +1 -1
- package/dist/common/components/interactive-image/interactive-image.d.ts +15 -0
- package/dist/common/components/interactive-image/interactive-image.js +55 -0
- package/dist/common/components/interactive-image/interactive-image.js.map +1 -0
- package/{common/components/intractive-image → dist/common/components/interactive-image}/interactive-image.module.scss +2 -2
- package/{common/components/intractive-image → dist/common/components/interactive-image}/types.d.ts +4 -4
- package/{common → dist/common/components/interactive-image}/types.js +1 -0
- package/dist/common/components/interactive-image/types.js.map +1 -0
- package/dist/common/components/media-gallery/index.d.ts +2 -0
- package/dist/common/components/media-gallery/index.js +7 -0
- package/dist/common/components/media-gallery/index.js.map +1 -0
- package/dist/common/components/media-gallery/media-gallery.d.ts +16 -0
- package/dist/common/components/media-gallery/media-gallery.js +87 -0
- package/dist/common/components/media-gallery/media-gallery.js.map +1 -0
- package/dist/common/components/media-gallery/media-gallery.module.scss +35 -0
- package/dist/common/components/media-gallery/types.d.ts +12 -0
- package/dist/common/components/media-gallery/types.js +3 -0
- package/dist/common/components/media-gallery/types.js.map +1 -0
- package/dist/common/components/media-gallery/utils.d.ts +38 -0
- package/dist/common/components/media-gallery/utils.js +102 -0
- package/dist/common/components/media-gallery/utils.js.map +1 -0
- package/{common → dist/common}/components/media-modal/index.d.ts +4 -4
- package/{common → dist/common}/components/media-modal/index.js +6 -3
- package/dist/common/components/media-modal/index.js.map +1 -0
- package/{common → dist/common}/components/media-modal/layout.d.ts +5 -5
- package/dist/common/components/media-modal/layout.js +79 -0
- package/dist/common/components/media-modal/layout.js.map +1 -0
- package/{common → dist/common}/components/media-modal/layout.module.scss +3 -5
- package/{common → dist/common}/components/media-modal/parts/all-round-view.d.ts +1 -2
- package/dist/common/components/media-modal/parts/all-round-view.js +41 -0
- package/dist/common/components/media-modal/parts/all-round-view.js.map +1 -0
- package/{common → dist/common}/components/media-modal/parts/index.d.ts +3 -3
- package/dist/common/components/media-modal/parts/index.js +65 -0
- package/dist/common/components/media-modal/parts/index.js.map +1 -0
- package/dist/common/components/media-modal/parts/media-area.d.ts +25 -0
- package/dist/common/components/media-modal/parts/media-area.js +60 -0
- package/dist/common/components/media-modal/parts/media-area.js.map +1 -0
- package/dist/common/components/media-modal/parts/media-area.module.scss +21 -0
- package/dist/common/components/media-modal/parts/media-view.d.ts +20 -0
- package/dist/common/components/media-modal/parts/media-view.js +44 -0
- package/dist/common/components/media-modal/parts/media-view.js.map +1 -0
- package/{common → dist/common}/components/media-modal/parts/media-view.module.scss +8 -4
- package/{common → dist/common}/components/media-modal/parts/parts.module.scss +2 -2
- package/{common → dist/common}/components/media-modal/parts/product-brief.d.ts +4 -2
- package/dist/common/components/media-modal/parts/product-brief.js +39 -0
- package/dist/common/components/media-modal/parts/product-brief.js.map +1 -0
- package/{common → dist/common}/components/media-modal/parts/product-brief.module.scss +11 -9
- package/{common → dist/common}/components/media-modal/parts/review.d.ts +1 -1
- package/dist/common/components/media-modal/parts/review.js +31 -0
- package/dist/common/components/media-modal/parts/review.js.map +1 -0
- package/{common → dist/common}/components/media-modal/parts/review.module.scss +2 -2
- package/{common → dist/common}/components/media-modal/parts/scroll-section.d.ts +1 -1
- package/dist/common/components/media-modal/parts/scroll-section.js +19 -0
- package/dist/common/components/media-modal/parts/scroll-section.js.map +1 -0
- package/{common → dist/common}/components/media-modal/parts/scroll-section.module.scss +2 -2
- package/{common → dist/common}/components/media-modal/parts/thumbnail.d.ts +4 -4
- package/dist/common/components/media-modal/parts/thumbnail.js +35 -0
- package/dist/common/components/media-modal/parts/thumbnail.js.map +1 -0
- package/{common → dist/common}/components/media-modal/parts/thumbnail.module.scss +36 -14
- package/{common → dist/common}/components/media-modal/parts/thumbnails.d.ts +1 -1
- package/dist/common/components/media-modal/parts/thumbnails.js +58 -0
- package/dist/common/components/media-modal/parts/thumbnails.js.map +1 -0
- package/{common → dist/common}/components/media-modal/parts/thumbnails.module.scss +1 -1
- package/{common → dist/common}/components/media-modal/types.d.ts +1 -0
- package/dist/common/components/media-modal/types.js +3 -0
- package/dist/common/components/media-modal/types.js.map +1 -0
- package/{common → dist/common}/components/media-modal/utils.d.ts +5 -10
- package/{common → dist/common}/components/media-modal/utils.js +12 -26
- package/dist/common/components/media-modal/utils.js.map +1 -0
- package/dist/common/components/modifier/index.d.ts +2 -0
- package/dist/common/components/modifier/index.js +7 -0
- package/dist/common/components/modifier/index.js.map +1 -0
- package/dist/common/components/modifier/modifier.d.ts +13 -0
- package/dist/common/components/modifier/modifier.js +72 -0
- package/dist/common/components/modifier/modifier.js.map +1 -0
- package/{common/components/modifier/modifiers.module.scss → dist/common/components/modifier/modifier.module.scss} +68 -18
- package/{common/components/modifier/index.d.ts → dist/common/components/modifier/types.d.ts} +8 -19
- package/dist/common/components/modifier/types.js +3 -0
- package/dist/common/components/modifier/types.js.map +1 -0
- package/dist/common/components/pagination-controls/index.d.ts +2 -0
- package/dist/common/components/pagination-controls/index.js +9 -0
- package/dist/common/components/pagination-controls/index.js.map +1 -0
- package/dist/common/components/pagination-controls/pagination-controls.d.ts +30 -0
- package/dist/common/components/pagination-controls/pagination-controls.js +71 -0
- package/dist/common/components/pagination-controls/pagination-controls.js.map +1 -0
- package/dist/common/components/pagination-controls/pagination-controls.module.scss +73 -0
- package/dist/common/components/pagination-controls/types.d.ts +20 -0
- package/dist/common/components/pagination-controls/types.js +3 -0
- package/dist/common/components/pagination-controls/types.js.map +1 -0
- package/dist/common/components/product-image/index.d.ts +3 -0
- package/dist/common/components/product-image/index.js +8 -0
- package/dist/common/components/product-image/index.js.map +1 -0
- package/dist/common/components/product-image/product-image.d.ts +10 -0
- package/dist/common/components/product-image/product-image.js +31 -0
- package/dist/common/components/product-image/product-image.js.map +1 -0
- package/dist/common/components/product-image/product-image.module.scss +62 -0
- package/dist/common/components/product-image/types.d.ts +30 -0
- package/dist/common/components/product-image/types.js +3 -0
- package/dist/common/components/product-image/types.js.map +1 -0
- package/dist/common/components/product-image/utils.d.ts +2 -0
- package/dist/common/components/product-image/utils.js +6 -0
- package/dist/common/components/product-image/utils.js.map +1 -0
- package/dist/common/components/product-info/index.d.ts +4 -0
- package/dist/common/components/product-info/index.js +10 -0
- package/dist/common/components/product-info/index.js.map +1 -0
- package/dist/common/components/product-info/parts/adult-confirm-button.d.ts +7 -0
- package/dist/common/components/product-info/parts/adult-confirm-button.js +19 -0
- package/dist/common/components/product-info/parts/adult-confirm-button.js.map +1 -0
- package/dist/common/components/product-info/parts/badges.d.ts +7 -0
- package/dist/common/components/product-info/parts/badges.js +19 -0
- package/dist/common/components/product-info/parts/badges.js.map +1 -0
- package/dist/common/components/product-info/parts/badges.module.scss +3 -0
- package/dist/common/components/product-info/parts/cart-control.d.ts +7 -0
- package/dist/common/components/product-info/parts/cart-control.js +18 -0
- package/dist/common/components/product-info/parts/cart-control.js.map +1 -0
- package/dist/common/components/product-info/parts/cart-control.module.scss +41 -0
- package/dist/common/components/product-info/parts/footer.d.ts +7 -0
- package/dist/common/components/product-info/parts/footer.js +21 -0
- package/dist/common/components/product-info/parts/footer.js.map +1 -0
- package/dist/common/components/product-info/parts/footer.module.scss +3 -0
- package/dist/common/components/product-info/parts/image-button.d.ts +7 -0
- package/dist/common/components/product-info/parts/image-button.js +38 -0
- package/dist/common/components/product-info/parts/image-button.js.map +1 -0
- package/dist/common/components/product-info/parts/image-button.module.scss +40 -0
- package/dist/common/components/product-info/parts/image.d.ts +7 -0
- package/dist/common/components/product-info/parts/image.js +30 -0
- package/dist/common/components/product-info/parts/image.js.map +1 -0
- package/dist/common/components/product-info/parts/image.module.scss +24 -0
- package/dist/common/components/product-info/parts/index.d.ts +33 -0
- package/dist/common/components/product-info/parts/index.js +38 -0
- package/dist/common/components/product-info/parts/index.js.map +1 -0
- package/dist/common/components/product-info/parts/media.d.ts +7 -0
- package/dist/common/components/product-info/parts/media.js +18 -0
- package/dist/common/components/product-info/parts/media.js.map +1 -0
- package/dist/common/components/product-info/parts/media.module.scss +10 -0
- package/dist/common/components/product-info/parts/parts.module.scss +11 -0
- package/dist/common/components/product-info/parts/prices.d.ts +7 -0
- package/dist/common/components/product-info/parts/prices.js +25 -0
- package/dist/common/components/product-info/parts/prices.js.map +1 -0
- package/dist/common/components/product-info/parts/prices.module.scss +28 -0
- package/dist/common/components/product-info/parts/rating-counter.module.scss +7 -0
- package/dist/common/components/product-info/parts/rating-couter.d.ts +7 -0
- package/dist/common/components/product-info/parts/rating-couter.js +19 -0
- package/dist/common/components/product-info/parts/rating-couter.js.map +1 -0
- package/dist/common/components/product-info/parts/secondary-info.d.ts +7 -0
- package/dist/common/components/product-info/parts/secondary-info.js +18 -0
- package/dist/common/components/product-info/parts/secondary-info.js.map +1 -0
- package/dist/common/components/product-info/parts/secondary-info.module.scss +8 -0
- package/dist/common/components/product-info/parts/title.d.ts +7 -0
- package/dist/common/components/product-info/parts/title.js +23 -0
- package/dist/common/components/product-info/parts/title.js.map +1 -0
- package/dist/common/components/product-info/parts/title.module.scss +23 -0
- package/dist/common/components/product-info/parts/trademark-link.d.ts +7 -0
- package/dist/common/components/product-info/parts/trademark-link.js +19 -0
- package/dist/common/components/product-info/parts/trademark-link.js.map +1 -0
- package/dist/common/components/product-info/parts/trademark-link.module.scss +9 -0
- package/dist/common/components/product-info/parts/wait-list-add-link.d.ts +7 -0
- package/dist/common/components/product-info/parts/wait-list-add-link.js +19 -0
- package/dist/common/components/product-info/parts/wait-list-add-link.js.map +1 -0
- package/dist/common/components/product-info/parts/wait-list-added-link.d.ts +7 -0
- package/dist/common/components/product-info/parts/wait-list-added-link.js +21 -0
- package/dist/common/components/product-info/parts/wait-list-added-link.js.map +1 -0
- package/dist/common/components/product-info/parts/wait-list-added-link.module.scss +9 -0
- package/{common/components/product-info/index.d.ts → dist/common/components/product-info/product-info.d.ts} +4 -7
- package/dist/common/components/product-info/product-info.js +39 -0
- package/dist/common/components/product-info/product-info.js.map +1 -0
- package/dist/common/components/product-info/types.d.ts +69 -0
- package/dist/common/components/product-info/types.js +3 -0
- package/dist/common/components/product-info/types.js.map +1 -0
- package/{common → dist/common}/components/product-info/utils.d.ts +3 -1
- package/dist/common/components/product-info/utils.js +11 -0
- package/dist/common/components/product-info/utils.js.map +1 -0
- package/dist/common/components/rating-counter/index.d.ts +1 -0
- package/dist/common/components/rating-counter/index.js +6 -0
- package/dist/common/components/rating-counter/index.js.map +1 -0
- package/{common → dist/common}/components/rating-counter/rating-counter-util.scss +1 -1
- package/{common/components/rating-counter/index.d.ts → dist/common/components/rating-counter/rating-counter.d.ts} +12 -2
- package/dist/common/components/rating-counter/rating-counter.js +23 -0
- package/dist/common/components/rating-counter/rating-counter.js.map +1 -0
- package/{common → dist/common}/components/rating-counter/rating-counter.module.scss +2 -2
- package/dist/common/components/sale-progress-widget/index.d.ts +2 -0
- package/dist/common/components/sale-progress-widget/index.js +6 -0
- package/dist/common/components/sale-progress-widget/index.js.map +1 -0
- package/dist/common/components/sale-progress-widget/sale-progress-widget.d.ts +11 -0
- package/dist/common/components/sale-progress-widget/sale-progress-widget.js +50 -0
- package/dist/common/components/sale-progress-widget/sale-progress-widget.js.map +1 -0
- package/dist/common/components/sale-progress-widget/sale-progress-widget.module.scss +49 -0
- package/dist/common/components/sale-progress-widget/types.d.ts +14 -0
- package/dist/common/components/sale-progress-widget/types.js +3 -0
- package/dist/common/components/sale-progress-widget/types.js.map +1 -0
- package/dist/common/hooks/index.d.ts +3 -0
- package/dist/common/hooks/index.js +10 -0
- package/dist/common/hooks/index.js.map +1 -0
- package/dist/common/hooks/use-client-width.d.ts +8 -0
- package/dist/common/hooks/use-client-width.js +27 -0
- package/dist/common/hooks/use-client-width.js.map +1 -0
- package/dist/common/hooks/use-image-stub.d.ts +14 -0
- package/dist/common/hooks/use-image-stub.js +25 -0
- package/dist/common/hooks/use-image-stub.js.map +1 -0
- package/dist/common/hooks/use-mounted.d.ts +5 -0
- package/dist/common/hooks/use-mounted.js +18 -0
- package/dist/common/hooks/use-mounted.js.map +1 -0
- package/{desktop/components/breadcrumbs/index.d.ts → dist/desktop/components/breadcrumbs/breadcrumbs.d.ts} +5 -2
- package/dist/desktop/components/breadcrumbs/breadcrumbs.js +55 -0
- package/dist/desktop/components/breadcrumbs/breadcrumbs.js.map +1 -0
- package/{desktop → dist/desktop}/components/breadcrumbs/breadcrumbs.module.scss +37 -2
- package/dist/desktop/components/breadcrumbs/index.d.ts +1 -0
- package/dist/desktop/components/breadcrumbs/index.js +6 -0
- package/dist/desktop/components/breadcrumbs/index.js.map +1 -0
- package/{desktop → dist/desktop}/components/gallery-modal/components/all-round-view.d.ts +1 -2
- package/dist/desktop/components/gallery-modal/components/all-round-view.js +105 -0
- package/dist/desktop/components/gallery-modal/components/all-round-view.js.map +1 -0
- package/{desktop → dist/desktop}/components/gallery-modal/components/all-round-view.module.scss +6 -1
- package/{desktop → dist/desktop}/components/gallery-modal/components/gallery-modal.d.ts +6 -5
- package/dist/desktop/components/gallery-modal/components/gallery-modal.js +57 -0
- package/dist/desktop/components/gallery-modal/components/gallery-modal.js.map +1 -0
- package/{desktop → dist/desktop}/components/gallery-modal/components/gallery-modal.module.scss +10 -5
- package/{desktop → dist/desktop}/components/gallery-modal/components/image-overlay.d.ts +3 -3
- package/dist/desktop/components/gallery-modal/components/image-overlay.js +17 -0
- package/dist/desktop/components/gallery-modal/components/image-overlay.js.map +1 -0
- package/{desktop → dist/desktop}/components/gallery-modal/components/review-info.d.ts +1 -1
- package/dist/desktop/components/gallery-modal/components/review-info.js +56 -0
- package/dist/desktop/components/gallery-modal/components/review-info.js.map +1 -0
- package/{desktop → dist/desktop}/components/gallery-modal/components/review-info.module.scss +6 -2
- package/{desktop → dist/desktop}/components/gallery-modal/components/thumbnail.d.ts +3 -3
- package/dist/desktop/components/gallery-modal/components/thumbnail.js +21 -0
- package/dist/desktop/components/gallery-modal/components/thumbnail.js.map +1 -0
- package/{desktop → dist/desktop}/components/gallery-modal/components/thumbnail.module.scss +1 -1
- package/{desktop → dist/desktop}/components/gallery-modal/index.js +1 -0
- package/dist/desktop/components/gallery-modal/index.js.map +1 -0
- package/dist/desktop/components/gallery-modal/types.js +3 -0
- package/dist/desktop/components/gallery-modal/types.js.map +1 -0
- package/{desktop → dist/desktop}/components/gallery-modal/utils.d.ts +5 -3
- package/{desktop → dist/desktop}/components/gallery-modal/utils.js +21 -11
- package/dist/desktop/components/gallery-modal/utils.js.map +1 -0
- package/dist/desktop/components/person-info/index.d.ts +1 -0
- package/dist/desktop/components/person-info/index.js +6 -0
- package/dist/desktop/components/person-info/index.js.map +1 -0
- package/{desktop/components/person-info/index.d.ts → dist/desktop/components/person-info/person-info.d.ts} +6 -5
- package/dist/desktop/components/person-info/person-info.js +23 -0
- package/dist/desktop/components/person-info/person-info.js.map +1 -0
- package/{desktop → dist/desktop}/components/person-info/person-info.module.scss +2 -2
- package/dist/desktop/components/product-carousel/index.d.ts +2 -0
- package/dist/desktop/components/product-carousel/index.js +6 -0
- package/dist/desktop/components/product-carousel/index.js.map +1 -0
- package/dist/desktop/components/product-carousel/product-carousel.d.ts +7 -0
- package/dist/desktop/components/product-carousel/product-carousel.js +84 -0
- package/dist/desktop/components/product-carousel/product-carousel.js.map +1 -0
- package/{desktop → dist/desktop}/components/product-carousel/product-carousel.module.scss +2 -8
- package/dist/desktop/components/product-carousel/types.d.ts +39 -0
- package/dist/desktop/components/product-carousel/types.js +3 -0
- package/dist/desktop/components/product-carousel/types.js.map +1 -0
- package/{desktop → dist/desktop}/components/promotion-card/banner-title.d.ts +2 -3
- package/dist/desktop/components/promotion-card/banner-title.js +55 -0
- package/dist/desktop/components/promotion-card/banner-title.js.map +1 -0
- package/{desktop → dist/desktop}/components/promotion-card/banner-title.module.scss +11 -9
- package/{desktop → dist/desktop}/components/promotion-card/estimate.d.ts +1 -2
- package/{desktop → dist/desktop}/components/promotion-card/estimate.js +5 -7
- package/dist/desktop/components/promotion-card/estimate.js.map +1 -0
- package/dist/desktop/components/promotion-card/index.d.ts +4 -0
- package/dist/desktop/components/promotion-card/index.js +12 -0
- package/dist/desktop/components/promotion-card/index.js.map +1 -0
- package/dist/desktop/components/promotion-card/placeholder.d.ts +9 -0
- package/dist/desktop/components/promotion-card/placeholder.js +17 -0
- package/dist/desktop/components/promotion-card/placeholder.js.map +1 -0
- package/{desktop → dist/desktop}/components/promotion-card/placeholder.module.scss +2 -2
- package/{desktop/components/promotion-card/index.d.ts → dist/desktop/components/promotion-card/promotion-card.d.ts} +8 -8
- package/dist/desktop/components/promotion-card/promotion-card.js +47 -0
- package/dist/desktop/components/promotion-card/promotion-card.js.map +1 -0
- package/{desktop/components/promotion-card/index.module.scss → dist/desktop/components/promotion-card/promotion-card.module.scss} +36 -33
- package/dist/desktop/components/promotion-card/types.js +3 -0
- package/dist/desktop/components/promotion-card/types.js.map +1 -0
- package/{mobile/components/action-circles/index.d.ts → dist/mobile/components/action-circles/action-circles.d.ts} +2 -2
- package/{mobile/components/action-circles/index.js → dist/mobile/components/action-circles/action-circles.js} +5 -7
- package/dist/mobile/components/action-circles/action-circles.js.map +1 -0
- package/{mobile → dist/mobile}/components/action-circles/action-circles.module.scss +5 -2
- package/dist/mobile/components/action-circles/index.d.ts +1 -0
- package/dist/mobile/components/action-circles/index.js +6 -0
- package/dist/mobile/components/action-circles/index.js.map +1 -0
- package/{mobile/components/action-list/index.d.ts → dist/mobile/components/action-list/action-list.d.ts} +8 -2
- package/{mobile/components/action-list/index.js → dist/mobile/components/action-list/action-list.js} +11 -8
- package/dist/mobile/components/action-list/action-list.js.map +1 -0
- package/{mobile → dist/mobile}/components/action-list/action-list.module.scss +5 -2
- package/dist/mobile/components/action-list/index.d.ts +1 -0
- package/dist/mobile/components/action-list/index.js +7 -0
- package/dist/mobile/components/action-list/index.js.map +1 -0
- package/{mobile/components/breadcrumbs/index.d.ts → dist/mobile/components/breadcrumbs/breadcrumbs.d.ts} +1 -2
- package/{mobile/components/breadcrumbs/index.js → dist/mobile/components/breadcrumbs/breadcrumbs.js} +3 -2
- package/dist/mobile/components/breadcrumbs/breadcrumbs.js.map +1 -0
- package/{mobile → dist/mobile}/components/breadcrumbs/breadcrumbs.module.scss +1 -1
- package/dist/mobile/components/breadcrumbs/index.d.ts +1 -0
- package/dist/mobile/components/breadcrumbs/index.js +6 -0
- package/dist/mobile/components/breadcrumbs/index.js.map +1 -0
- package/dist/mobile/components/person-info/index.d.ts +1 -0
- package/dist/mobile/components/person-info/index.js +6 -0
- package/dist/mobile/components/person-info/index.js.map +1 -0
- package/{mobile/components/person-info/index.d.ts → dist/mobile/components/person-info/person-info.d.ts} +4 -2
- package/dist/mobile/components/person-info/person-info.js +37 -0
- package/dist/mobile/components/person-info/person-info.js.map +1 -0
- package/{mobile → dist/mobile}/components/person-info/person-info.module.scss +39 -17
- package/dist/mobile/components/product-row/index.d.ts +1 -0
- package/dist/mobile/components/product-row/index.js +6 -0
- package/dist/mobile/components/product-row/index.js.map +1 -0
- package/{mobile/components/product-row/index.d.ts → dist/mobile/components/product-row/product-row.d.ts} +1 -2
- package/dist/mobile/components/product-row/product-row.js +28 -0
- package/dist/mobile/components/product-row/product-row.js.map +1 -0
- package/{mobile → dist/mobile}/components/product-row/product-row.module.scss +1 -1
- package/dist/mobile/components/product-slider/index.d.ts +1 -0
- package/dist/mobile/components/product-slider/index.js +6 -0
- package/dist/mobile/components/product-slider/index.js.map +1 -0
- package/{mobile/components/product-slider/index.d.ts → dist/mobile/components/product-slider/product-slider.d.ts} +8 -3
- package/dist/mobile/components/product-slider/product-slider.js +38 -0
- package/dist/mobile/components/product-slider/product-slider.js.map +1 -0
- package/{mobile → dist/mobile}/components/product-slider/product-slider.module.scss +1 -1
- package/dist/mobile/components/search-bar/index.d.ts +1 -0
- package/dist/mobile/components/search-bar/index.js +6 -0
- package/dist/mobile/components/search-bar/index.js.map +1 -0
- package/{mobile/components/search-bar/index.d.ts → dist/mobile/components/search-bar/search-bar.d.ts} +12 -7
- package/dist/mobile/components/search-bar/search-bar.js +61 -0
- package/dist/mobile/components/search-bar/search-bar.js.map +1 -0
- package/{mobile → dist/mobile}/components/search-bar/search-bar.module.scss +6 -6
- package/dist/mobile/components/select-screen/index.d.ts +1 -0
- package/dist/mobile/components/select-screen/index.js +7 -0
- package/dist/mobile/components/select-screen/index.js.map +1 -0
- package/{mobile/components/select-screen/index.d.ts → dist/mobile/components/select-screen/select-screen.d.ts} +4 -4
- package/dist/mobile/components/select-screen/select-screen.js +30 -0
- package/dist/mobile/components/select-screen/select-screen.js.map +1 -0
- package/{mobile → dist/mobile}/components/select-screen/select-screen.module.scss +2 -2
- package/package.json +82 -76
- package/common/components/badge/badge.module.scss +0 -40
- package/common/components/badge/index.d.ts +0 -19
- package/common/components/badge/index.js +0 -83
- package/common/components/badge-list/index.js +0 -59
- package/common/components/intractive-image/interactive-image.d.ts +0 -15
- package/common/components/intractive-image/interactive-image.js +0 -96
- package/common/components/media-modal/__mocks__/index.d.ts +0 -3
- package/common/components/media-modal/__mocks__/index.js +0 -225
- package/common/components/media-modal/layout.js +0 -106
- package/common/components/media-modal/parts/all-round-view.js +0 -78
- package/common/components/media-modal/parts/index.js +0 -60
- package/common/components/media-modal/parts/media-content.d.ts +0 -19
- package/common/components/media-modal/parts/media-content.js +0 -103
- package/common/components/media-modal/parts/media-content.module.scss +0 -42
- package/common/components/media-modal/parts/media-view.d.ts +0 -13
- package/common/components/media-modal/parts/media-view.js +0 -62
- package/common/components/media-modal/parts/product-brief.js +0 -57
- package/common/components/media-modal/parts/review.js +0 -44
- package/common/components/media-modal/parts/scroll-section.js +0 -22
- package/common/components/media-modal/parts/thumbnail.js +0 -65
- package/common/components/media-modal/parts/thumbnails.js +0 -94
- package/common/components/modifier/index.js +0 -103
- package/common/components/product-info/index.js +0 -43
- package/common/components/product-info/parts.d.ts +0 -68
- package/common/components/product-info/parts.js +0 -212
- package/common/components/product-info/product-info.module.scss +0 -280
- package/common/components/product-info/types.d.ts +0 -7
- package/common/components/product-info/utils.js +0 -5
- package/common/components/rating-counter/index.js +0 -38
- package/common/components/rating-counter/star.svg +0 -5
- package/common/constants.d.ts +0 -2
- package/common/constants.js +0 -8
- package/common/icons/eighteen-plus.svg +0 -5
- package/common/icons/image-broken.svg +0 -7
- package/common/icons/touch-x.svg +0 -6
- package/common/types.d.ts +0 -1
- package/desktop/components/breadcrumbs/index.js +0 -83
- package/desktop/components/breadcrumbs/square-arrow-down.svg +0 -8
- package/desktop/components/gallery-modal/__mocks__/index.d.ts +0 -4
- package/desktop/components/gallery-modal/__mocks__/index.js +0 -147
- package/desktop/components/gallery-modal/components/all-round-view.js +0 -123
- package/desktop/components/gallery-modal/components/gallery-modal.js +0 -108
- package/desktop/components/gallery-modal/components/image-overlay.js +0 -30
- package/desktop/components/gallery-modal/components/review-info.js +0 -98
- package/desktop/components/gallery-modal/components/thumbnail.js +0 -24
- package/desktop/components/gallery-modal/icons/360.svg +0 -3
- package/desktop/components/gallery-modal/icons/pause.svg +0 -3
- package/desktop/components/gallery-modal/icons/turn-left.svg +0 -10
- package/desktop/components/gallery-modal/icons/turn-right.svg +0 -10
- package/desktop/components/gallery-modal/types.js +0 -2
- package/desktop/components/modifiers/button/index.d.ts +0 -22
- package/desktop/components/modifiers/button/index.js +0 -48
- package/desktop/components/modifiers/button/modifier-button.module.scss +0 -85
- package/desktop/components/modifiers/group/index.d.ts +0 -15
- package/desktop/components/modifiers/group/index.js +0 -70
- package/desktop/components/modifiers/group/modifiers-group.module.scss +0 -33
- package/desktop/components/modifiers/group/utils.d.ts +0 -20
- package/desktop/components/modifiers/group/utils.js +0 -73
- package/desktop/components/modifiers/modifiers.scss +0 -8
- package/desktop/components/person-info/index.js +0 -46
- package/desktop/components/product-card/index.d.ts +0 -26
- package/desktop/components/product-card/index.js +0 -105
- package/desktop/components/product-card/product-card.module.scss +0 -12
- package/desktop/components/product-carousel/hover-card.d.ts +0 -12
- package/desktop/components/product-carousel/hover-card.js +0 -76
- package/desktop/components/product-carousel/hover-card.module.scss +0 -14
- package/desktop/components/product-carousel/index.d.ts +0 -31
- package/desktop/components/product-carousel/index.js +0 -136
- package/desktop/components/product-carousel/utils.d.ts +0 -16
- package/desktop/components/product-carousel/utils.js +0 -44
- package/desktop/components/promotion-card/banner-title.js +0 -64
- package/desktop/components/promotion-card/index.js +0 -85
- package/desktop/components/promotion-card/placeholder.d.ts +0 -7
- package/desktop/components/promotion-card/placeholder.js +0 -19
- package/desktop/components/promotion-card/types.js +0 -2
- package/mobile/components/modifiers-list/index.d.ts +0 -22
- package/mobile/components/modifiers-list/index.js +0 -25
- package/mobile/components/modifiers-list/modifier-item/index.d.ts +0 -29
- package/mobile/components/modifiers-list/modifier-item/index.js +0 -38
- package/mobile/components/modifiers-list/modifier-item/modifier-item.module.scss +0 -70
- package/mobile/components/modifiers-list/modifiers-list.module.scss +0 -21
- package/mobile/components/person-info/index.js +0 -57
- package/mobile/components/product-row/index.js +0 -59
- package/mobile/components/product-slider/index.js +0 -60
- package/mobile/components/pseudo-input/index.d.ts +0 -11
- package/mobile/components/pseudo-input/index.js +0 -34
- package/mobile/components/pseudo-input/pseudo-input.module.scss +0 -24
- package/mobile/components/search-bar/index.js +0 -106
- package/mobile/components/select-screen/index.js +0 -68
- /package/{common → dist/common}/components/badge-list/badge-list.module.scss +0 -0
- /package/{common/components/intractive-image → dist/common/components/interactive-image}/index.d.ts +0 -0
- /package/{common → dist/common}/components/media-modal/parts/all-round-view.module.scss +0 -0
- /package/{desktop → dist/desktop}/components/gallery-modal/components/image-overlay.module.scss +0 -0
- /package/{desktop → dist/desktop}/components/gallery-modal/index.d.ts +0 -0
- /package/{desktop → dist/desktop}/components/gallery-modal/types.d.ts +0 -0
- /package/{desktop/components/promotion-card/variables.scss → dist/desktop/components/promotion-card/_variables.scss} +0 -0
- /package/{desktop → dist/desktop}/components/promotion-card/types.d.ts +0 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright [yyyy] [name of copyright owner]
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|
package/README.md
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# UI-moleculas
|
|
2
|
+
|
|
3
|
+
В этом проекте собраны UI-компоненты, привязанные к контексту интернет-магазина.
|
|
4
|
+
|
|
5
|
+
## Использование
|
|
6
|
+
|
|
7
|
+
### Установка
|
|
8
|
+
|
|
9
|
+
```sh
|
|
10
|
+
# с помощью npm
|
|
11
|
+
npm i -S @sima-land/moleculas
|
|
12
|
+
|
|
13
|
+
# или с помощью yarn
|
|
14
|
+
yarn add @sima-land/moleculas
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
### Настройка среды
|
|
18
|
+
|
|
19
|
+
Компоненты библиотеки используют:
|
|
20
|
+
|
|
21
|
+
- импорты css/scss-файлов как css-модулей (каждый такой файл промаркирован в виде `*.module.{css,scss}`)
|
|
22
|
+
|
|
23
|
+
Поэтому, для использования библиотеки необходимо сконфигурировать среду (сборщик или тестовый фреймворк) таким образом чтобы данные импорты работали корректно.
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { BadgeProps } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* Шильдик.
|
|
4
|
+
* @param props Свойства.
|
|
5
|
+
* @return Элемент.
|
|
6
|
+
*/
|
|
7
|
+
export declare function Badge({ rootRef, className, color, coloring, fields, style, shape, withHoverEffect, 'data-testid': testId, children, ...restProps }: BadgeProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.Badge = Badge;
|
|
7
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
|
+
const utils_1 = require("./utils");
|
|
9
|
+
const bind_1 = __importDefault(require("classnames/bind"));
|
|
10
|
+
const badge_module_scss_1 = __importDefault(require("./badge.module.scss"));
|
|
11
|
+
const cx = bind_1.default.bind(badge_module_scss_1.default);
|
|
12
|
+
/**
|
|
13
|
+
* Шильдик.
|
|
14
|
+
* @param props Свойства.
|
|
15
|
+
* @return Элемент.
|
|
16
|
+
*/
|
|
17
|
+
function Badge({ rootRef, className, color, coloring = 'outline', fields, style, shape = 'unset', withHoverEffect = true, 'data-testid': testId = 'badge', children, ...restProps }) {
|
|
18
|
+
const iconOnly = fields && fields.length === 1 && fields[0].type === 'svg-url';
|
|
19
|
+
const rootClassName = cx('root', iconOnly && 'icon-only', withHoverEffect && 'with-hover-effect', shape === 'round' && 'shape-round', shape === 'pill' && 'shape-pill', shape !== 'pill' && !iconOnly && 'padding-x-default', shape === 'pill' && !iconOnly && 'padding-x-pill', coloring === 'outline' && 'coloring-outline', coloring === 'fill' && 'coloring-fill', className);
|
|
20
|
+
const rootStyle = {
|
|
21
|
+
'--badge-color': (0, utils_1.tokenToCustomProperty)(color),
|
|
22
|
+
...style,
|
|
23
|
+
};
|
|
24
|
+
const content = fields ? (0, utils_1.renderFields)(fields) : children;
|
|
25
|
+
if (restProps.as === 'span') {
|
|
26
|
+
return ((0, jsx_runtime_1.jsx)("span", { ref: rootRef, className: rootClassName, style: rootStyle, "data-testid": testId, ...omitPropAs(restProps), children: content }));
|
|
27
|
+
}
|
|
28
|
+
if (restProps.as === 'div') {
|
|
29
|
+
return ((0, jsx_runtime_1.jsx)("div", { ref: rootRef, className: rootClassName, style: rootStyle, "data-testid": testId, ...omitPropAs(restProps), children: content }));
|
|
30
|
+
}
|
|
31
|
+
if (restProps.as === 'button') {
|
|
32
|
+
return ((0, jsx_runtime_1.jsx)("button", { ref: rootRef, className: rootClassName, style: rootStyle, "data-testid": testId, type: 'button', ...omitPropAs(restProps), children: content }));
|
|
33
|
+
}
|
|
34
|
+
return ((0, jsx_runtime_1.jsx)("a", { ref: rootRef, className: rootClassName, style: rootStyle, "data-testid": testId, ...omitPropAs(restProps), children: content }));
|
|
35
|
+
}
|
|
36
|
+
/** @inheritdoc */
|
|
37
|
+
function omitPropAs(props) {
|
|
38
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
39
|
+
const { as, ...omitted } = props;
|
|
40
|
+
return omitted;
|
|
41
|
+
}
|
|
42
|
+
//# sourceMappingURL=badge.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"badge.js","sourceRoot":"","sources":["../../../../src/common/components/badge/badge.tsx"],"names":[],"mappings":";;;;;AAYA,sBAyFC;;AApGD,mCAA8D;AAC9D,2DAAyC;AACzC,4EAAyC;AAEzC,MAAM,EAAE,GAAG,cAAU,CAAC,IAAI,CAAC,2BAAM,CAAC,CAAC;AAEnC;;;;GAIG;AACH,SAAgB,KAAK,CAAC,EACpB,OAAO,EACP,SAAS,EACT,KAAK,EACL,QAAQ,GAAG,SAAS,EACpB,MAAM,EACN,KAAK,EACL,KAAK,GAAG,OAAO,EACf,eAAe,GAAG,IAAI,EACtB,aAAa,EAAE,MAAM,GAAG,OAAO,EAC/B,QAAQ,EACR,GAAG,SAAS,EACD;IACX,MAAM,QAAQ,GAAG,MAAM,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,CAAC,IAAI,KAAK,SAAS,CAAC;IAE/E,MAAM,aAAa,GAAG,EAAE,CACtB,MAAM,EACN,QAAQ,IAAI,WAAW,EACvB,eAAe,IAAI,mBAAmB,EACtC,KAAK,KAAK,OAAO,IAAI,aAAa,EAClC,KAAK,KAAK,MAAM,IAAI,YAAY,EAChC,KAAK,KAAK,MAAM,IAAI,CAAC,QAAQ,IAAI,mBAAmB,EACpD,KAAK,KAAK,MAAM,IAAI,CAAC,QAAQ,IAAI,gBAAgB,EACjD,QAAQ,KAAK,SAAS,IAAI,kBAAkB,EAC5C,QAAQ,KAAK,MAAM,IAAI,eAAe,EACtC,SAAS,CACV,CAAC;IAEF,MAAM,SAAS,GAAe;QAC5B,eAAe,EAAE,IAAA,6BAAqB,EAAC,KAAK,CAAC;QAC7C,GAAG,KAAK;KACT,CAAC;IAEF,MAAM,OAAO,GAAG,MAAM,CAAC,CAAC,CAAC,IAAA,oBAAY,EAAC,MAAM,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC;IAEzD,IAAI,SAAS,CAAC,EAAE,KAAK,MAAM,EAAE,CAAC;QAC5B,OAAO,CACL,iCACE,GAAG,EAAE,OAAc,EACnB,SAAS,EAAE,aAAa,EACxB,KAAK,EAAE,SAAS,iBACH,MAAM,KACf,UAAU,CAAC,SAAS,CAAC,YAExB,OAAO,GACH,CACR,CAAC;IACJ,CAAC;IAED,IAAI,SAAS,CAAC,EAAE,KAAK,KAAK,EAAE,CAAC;QAC3B,OAAO,CACL,gCACE,GAAG,EAAE,OAAc,EACnB,SAAS,EAAE,aAAa,EACxB,KAAK,EAAE,SAAS,iBACH,MAAM,KACf,UAAU,CAAC,SAAS,CAAC,YAExB,OAAO,GACJ,CACP,CAAC;IACJ,CAAC;IAED,IAAI,SAAS,CAAC,EAAE,KAAK,QAAQ,EAAE,CAAC;QAC9B,OAAO,CACL,mCACE,GAAG,EAAE,OAAc,EACnB,SAAS,EAAE,aAAa,EACxB,KAAK,EAAE,SAAS,iBACH,MAAM,EACnB,IAAI,EAAC,QAAQ,KACT,UAAU,CAAC,SAAS,CAAC,YAExB,OAAO,GACD,CACV,CAAC;IACJ,CAAC;IAED,OAAO,CACL,8BACE,GAAG,EAAE,OAAc,EACnB,SAAS,EAAE,aAAa,EACxB,KAAK,EAAE,SAAS,iBACH,MAAM,KACf,UAAU,CAAC,SAAS,CAAC,YAExB,OAAO,GACN,CACL,CAAC;AACJ,CAAC;AAED,kBAAkB;AAClB,SAAS,UAAU,CAA6B,KAAQ;IACtD,6DAA6D;IAC7D,MAAM,EAAE,EAAE,EAAE,GAAG,OAAO,EAAE,GAAG,KAAK,CAAC;IAEjC,OAAO,OAAO,CAAC;AACjB,CAAC"}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
@use 'pkg:@sima-land/ui-nucleons/utils.scss';
|
|
2
|
+
|
|
3
|
+
$badge-size: 20px;
|
|
4
|
+
$icon-size: 16px;
|
|
5
|
+
|
|
6
|
+
.root {
|
|
7
|
+
@include utils.reset-button;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.root {
|
|
11
|
+
display: inline-flex;
|
|
12
|
+
align-items: center;
|
|
13
|
+
justify-content: center;
|
|
14
|
+
height: $badge-size;
|
|
15
|
+
font-weight: bold;
|
|
16
|
+
font-size: 12px;
|
|
17
|
+
line-height: 16px;
|
|
18
|
+
max-width: 100%;
|
|
19
|
+
min-width: $badge-size;
|
|
20
|
+
text-decoration: none;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.padding-x-default {
|
|
24
|
+
padding-left: 6px;
|
|
25
|
+
padding-right: 6px;
|
|
26
|
+
&.coloring-outline {
|
|
27
|
+
// ВАЖНО: учитываем border
|
|
28
|
+
padding-left: 5px;
|
|
29
|
+
padding-right: 5px;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.padding-x-pill {
|
|
34
|
+
padding-left: 8px;
|
|
35
|
+
padding-right: 8px;
|
|
36
|
+
&.coloring-outline {
|
|
37
|
+
// ВАЖНО: учитываем border
|
|
38
|
+
padding-left: 7px;
|
|
39
|
+
padding-right: 7px;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.shape-round {
|
|
44
|
+
border-radius: 4px;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.shape-pill {
|
|
48
|
+
border-radius: 99999px;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.with-hover-effect:hover {
|
|
52
|
+
position: relative;
|
|
53
|
+
cursor: pointer;
|
|
54
|
+
&::after {
|
|
55
|
+
content: '';
|
|
56
|
+
display: block;
|
|
57
|
+
position: absolute;
|
|
58
|
+
top: 0;
|
|
59
|
+
left: 0;
|
|
60
|
+
right: 0;
|
|
61
|
+
bottom: 0;
|
|
62
|
+
background: #fff;
|
|
63
|
+
opacity: 0.16;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.coloring-outline {
|
|
68
|
+
color: var(--badge-color, #aaa);
|
|
69
|
+
|
|
70
|
+
// ВАЖНО: используем border т.к. на Safari box-shadow пропадает при уменьшении масштаба
|
|
71
|
+
border: 1px solid var(--badge-border-color, var(--badge-color, #aaa));
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.coloring-fill {
|
|
75
|
+
background: var(--badge-color, #aaa);
|
|
76
|
+
color: var(--badge-text-color, #fff);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.icon-only {
|
|
80
|
+
width: $badge-size;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
// содержимое
|
|
84
|
+
.content {
|
|
85
|
+
overflow: hidden;
|
|
86
|
+
text-overflow: ellipsis;
|
|
87
|
+
white-space: nowrap;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.icon {
|
|
91
|
+
display: block;
|
|
92
|
+
width: $icon-size;
|
|
93
|
+
height: $icon-size;
|
|
94
|
+
line-height: $icon-size;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.icon + .content,
|
|
98
|
+
.content + .icon {
|
|
99
|
+
margin-left: 4px;
|
|
100
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Badge = void 0;
|
|
4
|
+
var badge_1 = require("./badge");
|
|
5
|
+
Object.defineProperty(exports, "Badge", { enumerable: true, get: function () { return badge_1.Badge; } });
|
|
6
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/common/components/badge/index.ts"],"names":[],"mappings":";;;AASA,iCAAgC;AAAvB,8FAAA,KAAK,OAAA"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import type { AnchorHTMLAttributes, ButtonHTMLAttributes, CSSProperties, HTMLAttributes, Ref } from 'react';
|
|
2
|
+
export interface BadgeField {
|
|
3
|
+
type: 'text' | 'timer' | 'svg-url';
|
|
4
|
+
value: string;
|
|
5
|
+
}
|
|
6
|
+
export interface BadgeStyle extends CSSProperties {
|
|
7
|
+
'--badge-color'?: string;
|
|
8
|
+
'--badge-text-color'?: string;
|
|
9
|
+
'--badge-border-color'?: string;
|
|
10
|
+
}
|
|
11
|
+
export interface BadgeSpecificProps {
|
|
12
|
+
/** Основной цвет, используется как цвет обводки, иконок и текста. */
|
|
13
|
+
color?: string;
|
|
14
|
+
/** Как применится цвет. */
|
|
15
|
+
coloring?: 'fill' | 'outline' | 'unset';
|
|
16
|
+
/** Содержимое шильдика. */
|
|
17
|
+
fields?: Array<BadgeField>;
|
|
18
|
+
/** Форма скруглений. */
|
|
19
|
+
shape?: 'round' | 'pill' | 'unset';
|
|
20
|
+
/** Нужен ли эффект при наведении. */
|
|
21
|
+
withHoverEffect?: boolean;
|
|
22
|
+
/** Стили. */
|
|
23
|
+
style?: BadgeStyle;
|
|
24
|
+
/** Идентификатор для систем автоматизированного тестирования. */
|
|
25
|
+
'data-testid'?: string;
|
|
26
|
+
rootRef?: Ref<HTMLElement>;
|
|
27
|
+
}
|
|
28
|
+
export interface BadgeAsAnchorProps extends BadgeSpecificProps, Omit<AnchorHTMLAttributes<HTMLAnchorElement>, 'color' | 'style'> {
|
|
29
|
+
as?: 'anchor';
|
|
30
|
+
}
|
|
31
|
+
export interface BadgeAsButtonProps extends BadgeSpecificProps, Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'color' | 'style'> {
|
|
32
|
+
as: 'button';
|
|
33
|
+
}
|
|
34
|
+
export interface BadgeAsDivProps extends BadgeSpecificProps, Omit<HTMLAttributes<HTMLDivElement>, 'color' | 'style'> {
|
|
35
|
+
as: 'div';
|
|
36
|
+
}
|
|
37
|
+
export interface BadgeAsSpanProps extends BadgeSpecificProps, Omit<HTMLAttributes<HTMLSpanElement>, 'color' | 'style'> {
|
|
38
|
+
as: 'span';
|
|
39
|
+
}
|
|
40
|
+
export type BadgeProps = BadgeAsAnchorProps | BadgeAsButtonProps | BadgeAsDivProps | BadgeAsSpanProps;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/common/components/badge/types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import type { BadgeField } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* Если переданное значение является токеном цвета/градиента, вернёт CSS-значение с соответствующей CSS-переменной.
|
|
5
|
+
* Иначе вернет само значение.
|
|
6
|
+
* @param value Значение.
|
|
7
|
+
* @return Значение или undefined.
|
|
8
|
+
*/
|
|
9
|
+
export declare function tokenToCustomProperty(value: string | undefined): string | undefined;
|
|
10
|
+
/**
|
|
11
|
+
* Сформирует содержимое шильдика на основе списка полей.
|
|
12
|
+
* Текстовые поля (type === text | timer) идущие подряд, будут объединены в один span.
|
|
13
|
+
* Между текстовыми полями в span будет вставлен 1 пробел.
|
|
14
|
+
* @param fields Поля.
|
|
15
|
+
* @return СОдержимое шильдика.
|
|
16
|
+
*/
|
|
17
|
+
export declare function renderFields(fields: BadgeField[]): ReactNode[];
|
|
18
|
+
/**
|
|
19
|
+
* Форматирует оставшееся время.
|
|
20
|
+
* @param distance Оставшееся время.
|
|
21
|
+
* @return Отформатированное время.
|
|
22
|
+
*/
|
|
23
|
+
export declare function formatDistance({ days, hours, minutes, }: {
|
|
24
|
+
days: number;
|
|
25
|
+
hours: number;
|
|
26
|
+
minutes: number;
|
|
27
|
+
}): string;
|
|
28
|
+
/**
|
|
29
|
+
* Форматирует число добавляя нули при необходимости.
|
|
30
|
+
* @param n Число.
|
|
31
|
+
* @return Отформатированное число.
|
|
32
|
+
*/
|
|
33
|
+
export declare function toTimePart(n: number): string;
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.tokenToCustomProperty = tokenToCustomProperty;
|
|
7
|
+
exports.renderFields = renderFields;
|
|
8
|
+
exports.formatDistance = formatDistance;
|
|
9
|
+
exports.toTimePart = toTimePart;
|
|
10
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
11
|
+
const colors_1 = require("@sima-land/ui-nucleons/colors");
|
|
12
|
+
const gradients_1 = require("@sima-land/ui-nucleons/gradients");
|
|
13
|
+
const timer_1 = require("@sima-land/ui-nucleons/timer");
|
|
14
|
+
const badge_module_scss_1 = __importDefault(require("./badge.module.scss"));
|
|
15
|
+
/**
|
|
16
|
+
* Если переданное значение является токеном цвета/градиента, вернёт CSS-значение с соответствующей CSS-переменной.
|
|
17
|
+
* Иначе вернет само значение.
|
|
18
|
+
* @param value Значение.
|
|
19
|
+
* @return Значение или undefined.
|
|
20
|
+
*/
|
|
21
|
+
function tokenToCustomProperty(value) {
|
|
22
|
+
if (typeof value !== 'string') {
|
|
23
|
+
return value;
|
|
24
|
+
}
|
|
25
|
+
if (value.startsWith('color/')) {
|
|
26
|
+
const colorName = value.replace('color/', '');
|
|
27
|
+
if (!colors_1.COLORS.has(colorName)) {
|
|
28
|
+
return value;
|
|
29
|
+
}
|
|
30
|
+
return `var(--color-${colorName})`;
|
|
31
|
+
}
|
|
32
|
+
if (value.startsWith('gradient/')) {
|
|
33
|
+
const gradientName = value.replace('gradient/', '');
|
|
34
|
+
if (!gradients_1.GRADIENTS.has(gradientName)) {
|
|
35
|
+
return value;
|
|
36
|
+
}
|
|
37
|
+
return `var(--gradient-${gradientName})`;
|
|
38
|
+
}
|
|
39
|
+
return value;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Сформирует содержимое шильдика на основе списка полей.
|
|
43
|
+
* Текстовые поля (type === text | timer) идущие подряд, будут объединены в один span.
|
|
44
|
+
* Между текстовыми полями в span будет вставлен 1 пробел.
|
|
45
|
+
* @param fields Поля.
|
|
46
|
+
* @return СОдержимое шильдика.
|
|
47
|
+
*/
|
|
48
|
+
function renderFields(fields) {
|
|
49
|
+
const result = [];
|
|
50
|
+
let item = null;
|
|
51
|
+
for (const field of fields) {
|
|
52
|
+
if (!item) {
|
|
53
|
+
switch (field.type) {
|
|
54
|
+
case 'text': {
|
|
55
|
+
item = [field.value];
|
|
56
|
+
break;
|
|
57
|
+
}
|
|
58
|
+
case 'timer': {
|
|
59
|
+
item = [(0, jsx_runtime_1.jsx)(timer_1.Timer, { date: field.value, timeout: 1000 * 60, format: formatDistance }, 0)];
|
|
60
|
+
break;
|
|
61
|
+
}
|
|
62
|
+
case 'svg-url': {
|
|
63
|
+
result.push((0, jsx_runtime_1.jsx)("img", { className: badge_module_scss_1.default.icon, src: field.value, alt: '' }, result.length));
|
|
64
|
+
break;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
else {
|
|
69
|
+
switch (field.type) {
|
|
70
|
+
case 'text': {
|
|
71
|
+
item.push(' ');
|
|
72
|
+
item.push(field.value);
|
|
73
|
+
break;
|
|
74
|
+
}
|
|
75
|
+
case 'timer': {
|
|
76
|
+
item.push(' ');
|
|
77
|
+
item.push((0, jsx_runtime_1.jsx)(timer_1.Timer, { date: field.value, timeout: 1000 * 60, format: formatDistance }, item.length));
|
|
78
|
+
break;
|
|
79
|
+
}
|
|
80
|
+
case 'svg-url': {
|
|
81
|
+
// вложенный span нужен для того чтобы объединить `display: inline-flex` и `text-overflow: ellipsis`
|
|
82
|
+
result.push((0, jsx_runtime_1.jsx)("span", { className: badge_module_scss_1.default.content, children: item }, result.length));
|
|
83
|
+
item = null;
|
|
84
|
+
result.push((0, jsx_runtime_1.jsx)("img", { className: badge_module_scss_1.default.icon, src: field.value, alt: '' }, result.length));
|
|
85
|
+
break;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
if (item) {
|
|
91
|
+
result.push((0, jsx_runtime_1.jsx)("span", { className: badge_module_scss_1.default.content, children: item }, result.length));
|
|
92
|
+
item = null;
|
|
93
|
+
}
|
|
94
|
+
return result;
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* Форматирует оставшееся время.
|
|
98
|
+
* @param distance Оставшееся время.
|
|
99
|
+
* @return Отформатированное время.
|
|
100
|
+
*/
|
|
101
|
+
function formatDistance({ days, hours, minutes, }) {
|
|
102
|
+
return `${toTimePart(days)}:${toTimePart(hours % 24)}:${toTimePart(minutes % 60)}`;
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* Форматирует число добавляя нули при необходимости.
|
|
106
|
+
* @param n Число.
|
|
107
|
+
* @return Отформатированное число.
|
|
108
|
+
*/
|
|
109
|
+
function toTimePart(n) {
|
|
110
|
+
return `${n}`.padStart(2, '0');
|
|
111
|
+
}
|
|
112
|
+
//# sourceMappingURL=utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../../src/common/components/badge/utils.tsx"],"names":[],"mappings":";;;;;AAaA,sDA0BC;AASD,oCAqEC;AAOD,wCAUC;AAOD,gCAEC;;AA7ID,0DAAuD;AACvD,gEAA6D;AAC7D,wDAAqD;AACrD,4EAAyC;AAEzC;;;;;GAKG;AACH,SAAgB,qBAAqB,CAAC,KAAyB;IAC7D,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;QAC9B,OAAO,KAAK,CAAC;IACf,CAAC;IAED,IAAI,KAAK,CAAC,UAAU,CAAC,QAAQ,CAAC,EAAE,CAAC;QAC/B,MAAM,SAAS,GAAG,KAAK,CAAC,OAAO,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC;QAE9C,IAAI,CAAC,eAAM,CAAC,GAAG,CAAC,SAAgB,CAAC,EAAE,CAAC;YAClC,OAAO,KAAK,CAAC;QACf,CAAC;QAED,OAAO,eAAe,SAAS,GAAG,CAAC;IACrC,CAAC;IAED,IAAI,KAAK,CAAC,UAAU,CAAC,WAAW,CAAC,EAAE,CAAC;QAClC,MAAM,YAAY,GAAG,KAAK,CAAC,OAAO,CAAC,WAAW,EAAE,EAAE,CAAC,CAAC;QAEpD,IAAI,CAAC,qBAAS,CAAC,GAAG,CAAC,YAAmB,CAAC,EAAE,CAAC;YACxC,OAAO,KAAK,CAAC;QACf,CAAC;QAED,OAAO,kBAAkB,YAAY,GAAG,CAAC;IAC3C,CAAC;IAED,OAAO,KAAK,CAAC;AACf,CAAC;AAED;;;;;;GAMG;AACH,SAAgB,YAAY,CAAC,MAAoB;IAC/C,MAAM,MAAM,GAAgB,EAAE,CAAC;IAE/B,IAAI,IAAI,GAA4B,IAAI,CAAC;IAEzC,KAAK,MAAM,KAAK,IAAI,MAAM,EAAE,CAAC;QAC3B,IAAI,CAAC,IAAI,EAAE,CAAC;YACV,QAAQ,KAAK,CAAC,IAAI,EAAE,CAAC;gBACnB,KAAK,MAAM,CAAC,CAAC,CAAC;oBACZ,IAAI,GAAG,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;oBACrB,MAAM;gBACR,CAAC;gBAED,KAAK,OAAO,CAAC,CAAC,CAAC;oBACb,IAAI,GAAG,CAAC,uBAAC,aAAK,IAAS,IAAI,EAAE,KAAK,CAAC,KAAK,EAAE,OAAO,EAAE,IAAI,GAAG,EAAE,EAAE,MAAM,EAAE,cAAc,IAAhE,CAAC,CAAmE,CAAC,CAAC;oBAC1F,MAAM;gBACR,CAAC;gBAED,KAAK,SAAS,CAAC,CAAC,CAAC;oBACf,MAAM,CAAC,IAAI,CAAC,gCAAyB,SAAS,EAAE,2BAAM,CAAC,IAAI,EAAE,GAAG,EAAE,KAAK,CAAC,KAAK,EAAE,GAAG,EAAC,EAAE,IAA/D,MAAM,CAAC,MAAM,CAAqD,CAAC,CAAC;oBAC1F,MAAM;gBACR,CAAC;YACH,CAAC;QACH,CAAC;aAAM,CAAC;YACN,QAAQ,KAAK,CAAC,IAAI,EAAE,CAAC;gBACnB,KAAK,MAAM,CAAC,CAAC,CAAC;oBACZ,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;oBACf,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;oBACvB,MAAM;gBACR,CAAC;gBAED,KAAK,OAAO,CAAC,CAAC,CAAC;oBACb,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;oBACf,IAAI,CAAC,IAAI,CACP,uBAAC,aAAK,IAEJ,IAAI,EAAE,KAAK,CAAC,KAAK,EACjB,OAAO,EAAE,IAAI,GAAG,EAAE,EAClB,MAAM,EAAE,cAAc,IAHjB,IAAI,CAAC,MAAM,CAIhB,CACH,CAAC;oBACF,MAAM;gBACR,CAAC;gBAED,KAAK,SAAS,CAAC,CAAC,CAAC;oBACf,oGAAoG;oBACpG,MAAM,CAAC,IAAI,CACT,iCAA0B,SAAS,EAAE,2BAAM,CAAC,OAAO,YAChD,IAAI,IADI,MAAM,CAAC,MAAM,CAEjB,CACR,CAAC;oBACF,IAAI,GAAG,IAAI,CAAC;oBACZ,MAAM,CAAC,IAAI,CAAC,gCAAyB,SAAS,EAAE,2BAAM,CAAC,IAAI,EAAE,GAAG,EAAE,KAAK,CAAC,KAAK,EAAE,GAAG,EAAC,EAAE,IAA/D,MAAM,CAAC,MAAM,CAAqD,CAAC,CAAC;oBAC1F,MAAM;gBACR,CAAC;YACH,CAAC;QACH,CAAC;IACH,CAAC;IAED,IAAI,IAAI,EAAE,CAAC;QACT,MAAM,CAAC,IAAI,CACT,iCAA0B,SAAS,EAAE,2BAAM,CAAC,OAAO,YAChD,IAAI,IADI,MAAM,CAAC,MAAM,CAEjB,CACR,CAAC;QACF,IAAI,GAAG,IAAI,CAAC;IACd,CAAC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC;AAED;;;;GAIG;AACH,SAAgB,cAAc,CAAC,EAC7B,IAAI,EACJ,KAAK,EACL,OAAO,GAKR;IACC,OAAO,GAAG,UAAU,CAAC,IAAI,CAAC,IAAI,UAAU,CAAC,KAAK,GAAG,EAAE,CAAC,IAAI,UAAU,CAAC,OAAO,GAAG,EAAE,CAAC,EAAE,CAAC;AACrF,CAAC;AAED;;;;GAIG;AACH,SAAgB,UAAU,CAAC,CAAS;IAClC,OAAO,GAAG,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;AACjC,CAAC"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { ReactNode, CSSProperties } from 'react';
|
|
2
2
|
export interface BadgeListProps {
|
|
3
3
|
/** Список данных для шильдиков. */
|
|
4
|
-
children?:
|
|
4
|
+
children?: ReactNode;
|
|
5
5
|
/** CSS-класс корневого элемента. */
|
|
6
6
|
className?: string;
|
|
7
7
|
/** Стили корневого элемента. */
|
|
8
|
-
style?:
|
|
8
|
+
style?: CSSProperties;
|
|
9
9
|
/** Лимит количества строк, не влезающие шильдики будут скрыты. */
|
|
10
10
|
lineLimit?: number;
|
|
11
11
|
}
|
|
@@ -15,7 +15,7 @@ export interface BadgeListProps {
|
|
|
15
15
|
* @return Элемент.
|
|
16
16
|
*/
|
|
17
17
|
export declare const BadgeList: {
|
|
18
|
-
({ children, className, lineLimit, style }: BadgeListProps): JSX.Element;
|
|
18
|
+
({ children, className, lineLimit, style }: BadgeListProps): import("react").JSX.Element;
|
|
19
19
|
Slot: typeof BadgeListSlot;
|
|
20
20
|
};
|
|
21
21
|
/**
|
|
@@ -25,5 +25,5 @@ export declare const BadgeList: {
|
|
|
25
25
|
*/
|
|
26
26
|
declare function BadgeListSlot({ children }: {
|
|
27
27
|
children?: ReactNode;
|
|
28
|
-
}): JSX.Element;
|
|
28
|
+
}): import("react").JSX.Element;
|
|
29
29
|
export {};
|