@sima-land/moleculas 16.0.0-alpha.2 → 16.0.0-alpha.21
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 +23 -0
- package/common/components/badge/badge.d.ts +8 -0
- package/common/components/badge/badge.js +55 -0
- package/common/components/badge/badge.js.map +1 -0
- package/common/components/badge/badge.m.scss +81 -0
- package/common/components/badge/index.d.ts +2 -19
- package/common/components/badge/index.js +3 -80
- package/common/components/badge/index.js.map +1 -0
- package/common/components/badge/types.d.ts +26 -0
- package/common/components/{intractive-image → badge}/types.js +1 -0
- package/common/components/badge/types.js.map +1 -0
- package/common/components/badge-list/badge-list.d.ts +29 -0
- package/common/components/badge-list/badge-list.js +38 -0
- package/common/components/badge-list/badge-list.js.map +1 -0
- package/common/components/badge-list/index.d.ts +1 -29
- package/common/components/badge-list/index.js +3 -56
- package/common/components/badge-list/index.js.map +1 -0
- package/common/components/breadcrumbs/breadcrumbs.d.ts +46 -0
- package/common/components/breadcrumbs/breadcrumbs.js +83 -0
- package/common/components/breadcrumbs/breadcrumbs.js.map +1 -0
- package/common/components/breadcrumbs/breadcrumbs.m.scss +113 -0
- package/common/components/breadcrumbs/index.d.ts +2 -0
- package/common/components/breadcrumbs/index.js +7 -0
- package/common/components/breadcrumbs/index.js.map +1 -0
- package/common/components/breadcrumbs/types.d.ts +8 -0
- package/common/{types.js → components/breadcrumbs/types.js} +1 -0
- package/common/components/breadcrumbs/types.js.map +1 -0
- package/common/components/img-stub/img-stub.d.ts +14 -0
- package/common/components/img-stub/img-stub.js +21 -0
- package/common/components/img-stub/img-stub.js.map +1 -0
- package/common/components/img-stub/img-stub.m.scss +36 -0
- package/common/components/img-stub/index.d.ts +1 -0
- package/common/components/img-stub/index.js +6 -0
- package/common/components/img-stub/index.js.map +1 -0
- package/common/components/{intractive-image → interactive-image}/index.js +1 -0
- package/common/components/interactive-image/index.js.map +1 -0
- package/common/components/interactive-image/interactive-image.d.ts +15 -0
- package/common/components/interactive-image/interactive-image.js +56 -0
- package/common/components/interactive-image/interactive-image.js.map +1 -0
- package/common/components/{intractive-image → interactive-image}/types.d.ts +4 -4
- package/common/components/interactive-image/types.js +3 -0
- package/common/components/interactive-image/types.js.map +1 -0
- package/common/components/media-gallery/index.d.ts +2 -0
- package/common/components/media-gallery/index.js +7 -0
- package/common/components/media-gallery/index.js.map +1 -0
- package/common/components/media-gallery/media-gallery.d.ts +16 -0
- package/common/components/media-gallery/media-gallery.js +90 -0
- package/common/components/media-gallery/media-gallery.js.map +1 -0
- package/common/components/media-gallery/media-gallery.m.scss +35 -0
- package/common/components/media-gallery/types.d.ts +12 -0
- package/common/components/media-gallery/types.js +3 -0
- package/common/components/media-gallery/types.js.map +1 -0
- package/common/components/media-gallery/utils.d.ts +38 -0
- package/common/components/media-gallery/utils.js +102 -0
- package/common/components/media-gallery/utils.js.map +1 -0
- package/common/components/media-modal/__mocks__/images/armchair.jpg +0 -0
- package/common/components/media-modal/__mocks__/images/cup.jpg +0 -0
- package/common/components/media-modal/__mocks__/images/plant.jpg +0 -0
- package/common/components/media-modal/__mocks__/images/stump.jpg +0 -0
- package/common/components/media-modal/__mocks__/images/table.jpg +0 -0
- package/common/components/media-modal/__mocks__/images/vase.jpg +0 -0
- package/common/components/media-modal/__mocks__/index.d.ts +3 -0
- package/common/components/media-modal/__mocks__/index.js +251 -0
- package/common/components/media-modal/__mocks__/index.js.map +1 -0
- package/common/components/media-modal/__mocks__/thumbnails/armchair.jpg +0 -0
- package/common/components/media-modal/__mocks__/thumbnails/cup.jpg +0 -0
- package/common/components/media-modal/__mocks__/thumbnails/plant.jpg +0 -0
- package/common/components/media-modal/__mocks__/thumbnails/stump.jpg +0 -0
- package/common/components/media-modal/__mocks__/thumbnails/table.jpg +0 -0
- package/common/components/media-modal/__mocks__/thumbnails/vase.jpg +0 -0
- package/common/components/media-modal/__mocks__/thumbnails/video3404953.jpg +0 -0
- package/common/components/media-modal/__mocks__/thumbnails/video3619217.jpg +0 -0
- package/common/components/media-modal/__mocks__/thumbnails/video4093038.jpg +0 -0
- package/common/components/media-modal/__mocks__/thumbnails/video6907296.jpg +0 -0
- package/common/components/media-modal/index.d.ts +11 -0
- package/common/components/media-modal/index.js +29 -0
- package/common/components/media-modal/index.js.map +1 -0
- package/common/components/media-modal/layout.d.ts +36 -0
- package/common/components/media-modal/layout.js +81 -0
- package/common/components/media-modal/layout.js.map +1 -0
- package/common/components/media-modal/layout.m.scss +78 -0
- package/common/components/media-modal/parts/all-round-view.d.ts +7 -0
- package/common/components/media-modal/parts/all-round-view.js +42 -0
- package/common/components/media-modal/parts/all-round-view.js.map +1 -0
- package/common/components/media-modal/parts/all-round-view.m.scss +30 -0
- package/common/components/media-modal/parts/index.d.ts +36 -0
- package/common/components/media-modal/parts/index.js +65 -0
- package/common/components/media-modal/parts/index.js.map +1 -0
- package/common/components/media-modal/parts/media-area.d.ts +25 -0
- package/common/components/media-modal/parts/media-area.js +61 -0
- package/common/components/media-modal/parts/media-area.js.map +1 -0
- package/common/components/media-modal/parts/media-area.m.scss +21 -0
- package/common/components/media-modal/parts/media-view.d.ts +20 -0
- package/common/components/media-modal/parts/media-view.js +46 -0
- package/common/components/media-modal/parts/media-view.js.map +1 -0
- package/common/components/media-modal/parts/media-view.m.scss +34 -0
- package/common/components/media-modal/parts/parts.m.scss +21 -0
- package/common/components/media-modal/parts/product-brief.d.ts +20 -0
- package/common/components/media-modal/parts/product-brief.js +40 -0
- package/common/components/media-modal/parts/product-brief.js.map +1 -0
- package/common/components/media-modal/parts/product-brief.m.scss +149 -0
- package/common/components/media-modal/parts/review.d.ts +15 -0
- package/common/components/media-modal/parts/review.js +32 -0
- package/common/components/media-modal/parts/review.js.map +1 -0
- package/common/components/media-modal/parts/review.m.scss +86 -0
- package/common/components/media-modal/parts/scroll-section.d.ts +11 -0
- package/common/components/media-modal/parts/scroll-section.js +20 -0
- package/common/components/media-modal/parts/scroll-section.js.map +1 -0
- package/common/components/media-modal/parts/scroll-section.m.scss +32 -0
- package/common/components/media-modal/parts/thumbnail.d.ts +22 -0
- package/common/components/media-modal/parts/thumbnail.js +36 -0
- package/common/components/media-modal/parts/thumbnail.js.map +1 -0
- package/common/components/media-modal/parts/thumbnail.m.scss +156 -0
- package/common/components/media-modal/parts/thumbnails.d.ts +13 -0
- package/common/components/media-modal/parts/thumbnails.js +60 -0
- package/common/components/media-modal/parts/thumbnails.js.map +1 -0
- package/common/components/media-modal/parts/thumbnails.m.scss +16 -0
- package/common/components/media-modal/types.d.ts +18 -0
- package/common/components/media-modal/types.js +3 -0
- package/common/components/media-modal/types.js.map +1 -0
- package/common/components/media-modal/utils.d.ts +42 -0
- package/common/components/media-modal/utils.js +110 -0
- package/common/components/media-modal/utils.js.map +1 -0
- package/common/components/modifier/index.d.ts +2 -46
- package/common/components/modifier/index.js +4 -99
- package/common/components/modifier/index.js.map +1 -0
- package/common/components/modifier/modifier.d.ts +13 -0
- package/common/components/modifier/modifier.js +74 -0
- package/common/components/modifier/modifier.js.map +1 -0
- package/common/components/modifier/{modifiers.module.scss → modifier.m.scss} +61 -0
- package/common/components/modifier/types.d.ts +35 -0
- package/common/components/modifier/types.js +3 -0
- package/common/components/modifier/types.js.map +1 -0
- package/common/components/pagination-controls/index.d.ts +2 -0
- package/common/components/pagination-controls/index.js +9 -0
- package/common/components/pagination-controls/index.js.map +1 -0
- package/common/components/pagination-controls/pagination-controls.d.ts +30 -0
- package/common/components/pagination-controls/pagination-controls.js +72 -0
- package/common/components/pagination-controls/pagination-controls.js.map +1 -0
- package/common/components/pagination-controls/pagination-controls.m.scss +70 -0
- package/common/components/pagination-controls/types.d.ts +20 -0
- package/common/components/pagination-controls/types.js +3 -0
- package/common/components/pagination-controls/types.js.map +1 -0
- package/common/components/product-info/index.d.ts +1 -16
- package/common/components/product-info/index.js +5 -41
- package/common/components/product-info/index.js.map +1 -0
- package/common/components/product-info/parts.d.ts +22 -21
- package/common/components/product-info/parts.js +35 -83
- package/common/components/product-info/parts.js.map +1 -0
- package/common/components/product-info/product-info.d.ts +15 -0
- package/common/components/product-info/product-info.js +33 -0
- package/common/components/product-info/product-info.js.map +1 -0
- package/common/components/product-info/{product-info.module.scss → product-info.m.scss} +9 -0
- package/common/components/product-info/types.d.ts +2 -2
- package/common/components/product-info/types.js +1 -0
- package/common/components/product-info/types.js.map +1 -0
- package/common/components/product-info/utils.js +1 -0
- package/common/components/product-info/utils.js.map +1 -0
- package/common/components/rating-counter/index.d.ts +1 -25
- package/common/components/rating-counter/index.js +3 -35
- package/common/components/rating-counter/index.js.map +1 -0
- package/common/components/rating-counter/rating-counter-util.scss +1 -1
- package/common/components/rating-counter/rating-counter.d.ts +35 -0
- package/common/components/rating-counter/rating-counter.js +24 -0
- package/common/components/rating-counter/rating-counter.js.map +1 -0
- package/common/hooks/index.d.ts +19 -0
- package/common/hooks/index.js +39 -0
- package/common/hooks/index.js.map +1 -0
- package/desktop/components/breadcrumbs/breadcrumbs.d.ts +31 -0
- package/desktop/components/breadcrumbs/breadcrumbs.js +56 -0
- package/desktop/components/breadcrumbs/breadcrumbs.js.map +1 -0
- package/desktop/components/breadcrumbs/{breadcrumbs.module.scss → breadcrumbs.m.scss} +36 -1
- package/desktop/components/breadcrumbs/index.d.ts +1 -28
- package/desktop/components/breadcrumbs/index.js +3 -80
- package/desktop/components/breadcrumbs/index.js.map +1 -0
- package/desktop/components/gallery-modal/__mocks__/index.js +1 -0
- package/desktop/components/gallery-modal/__mocks__/index.js.map +1 -0
- package/desktop/components/gallery-modal/components/all-round-view.d.ts +5 -2
- package/desktop/components/gallery-modal/components/all-round-view.js +47 -62
- package/desktop/components/gallery-modal/components/all-round-view.js.map +1 -0
- package/desktop/components/gallery-modal/components/{all-round-view.module.scss → all-round-view.m.scss} +5 -0
- package/desktop/components/gallery-modal/components/gallery-modal.d.ts +4 -5
- package/desktop/components/gallery-modal/components/gallery-modal.js +16 -66
- package/desktop/components/gallery-modal/components/gallery-modal.js.map +1 -0
- package/desktop/components/gallery-modal/components/{gallery-modal.module.scss → gallery-modal.m.scss} +5 -3
- package/desktop/components/gallery-modal/components/image-overlay.d.ts +3 -3
- package/desktop/components/gallery-modal/components/image-overlay.js +4 -17
- package/desktop/components/gallery-modal/components/image-overlay.js.map +1 -0
- package/desktop/components/gallery-modal/components/{image-overlay.module.scss → image-overlay.m.scss} +1 -0
- package/desktop/components/gallery-modal/components/review-info.d.ts +1 -1
- package/desktop/components/gallery-modal/components/review-info.js +11 -52
- package/desktop/components/gallery-modal/components/review-info.js.map +1 -0
- package/desktop/components/gallery-modal/components/thumbnail.d.ts +3 -3
- package/desktop/components/gallery-modal/components/thumbnail.js +7 -10
- package/desktop/components/gallery-modal/components/thumbnail.js.map +1 -0
- package/desktop/components/gallery-modal/index.js +1 -0
- package/desktop/components/gallery-modal/index.js.map +1 -0
- package/desktop/components/gallery-modal/types.js +1 -0
- package/desktop/components/gallery-modal/types.js.map +1 -0
- package/desktop/components/gallery-modal/utils.d.ts +5 -3
- package/desktop/components/gallery-modal/utils.js +18 -8
- package/desktop/components/gallery-modal/utils.js.map +1 -0
- package/desktop/components/person-info/index.d.ts +1 -41
- package/desktop/components/person-info/index.js +3 -43
- package/desktop/components/person-info/index.js.map +1 -0
- package/desktop/components/person-info/person-info.d.ts +42 -0
- package/desktop/components/person-info/person-info.js +24 -0
- package/desktop/components/person-info/person-info.js.map +1 -0
- package/desktop/components/person-info/{person-info.module.scss → person-info.m.scss} +1 -1
- package/desktop/components/product-card/index.d.ts +2 -26
- package/desktop/components/product-card/index.js +7 -103
- package/desktop/components/product-card/index.js.map +1 -0
- package/desktop/components/product-card/product-card.d.ts +23 -0
- package/desktop/components/product-card/product-card.js +94 -0
- package/desktop/components/product-card/product-card.js.map +1 -0
- package/desktop/components/product-card/types.d.ts +19 -0
- package/desktop/components/product-card/types.js +3 -0
- package/desktop/components/product-card/types.js.map +1 -0
- package/desktop/components/product-carousel/hover-card.d.ts +2 -7
- package/desktop/components/product-carousel/hover-card.js +13 -49
- package/desktop/components/product-carousel/hover-card.js.map +1 -0
- package/desktop/components/product-carousel/{hover-card.module.scss → hover-card.m.scss} +2 -2
- package/desktop/components/product-carousel/index.d.ts +2 -31
- package/desktop/components/product-carousel/index.js +3 -133
- package/desktop/components/product-carousel/index.js.map +1 -0
- package/desktop/components/product-carousel/product-carousel.d.ts +7 -0
- package/desktop/components/product-carousel/product-carousel.js +95 -0
- package/desktop/components/product-carousel/product-carousel.js.map +1 -0
- package/desktop/components/product-carousel/{product-carousel.module.scss → product-carousel.m.scss} +1 -1
- package/desktop/components/product-carousel/types.d.ts +33 -0
- package/desktop/components/product-carousel/types.js +3 -0
- package/desktop/components/product-carousel/types.js.map +1 -0
- package/desktop/components/product-carousel/utils.d.ts +4 -4
- package/desktop/components/product-carousel/utils.js +8 -7
- package/desktop/components/product-carousel/utils.js.map +1 -0
- package/desktop/components/promotion-card/banner-title.d.ts +2 -3
- package/desktop/components/promotion-card/banner-title.js +9 -19
- package/desktop/components/promotion-card/banner-title.js.map +1 -0
- package/desktop/components/promotion-card/estimate.d.ts +1 -2
- package/desktop/components/promotion-card/estimate.js +3 -5
- package/desktop/components/promotion-card/estimate.js.map +1 -0
- package/desktop/components/promotion-card/index.d.ts +4 -31
- package/desktop/components/promotion-card/index.js +10 -83
- package/desktop/components/promotion-card/index.js.map +1 -0
- package/desktop/components/promotion-card/placeholder.d.ts +4 -2
- package/desktop/components/promotion-card/placeholder.js +4 -6
- package/desktop/components/promotion-card/placeholder.js.map +1 -0
- package/desktop/components/promotion-card/promotion-card.d.ts +32 -0
- package/desktop/components/promotion-card/promotion-card.js +39 -0
- package/desktop/components/promotion-card/promotion-card.js.map +1 -0
- package/desktop/components/promotion-card/{index.module.scss → promotion-card.m.scss} +8 -6
- package/desktop/components/promotion-card/types.js +1 -0
- package/desktop/components/promotion-card/types.js.map +1 -0
- package/mobile/components/action-circles/action-circles.d.ts +22 -0
- package/mobile/components/action-circles/action-circles.js +31 -0
- package/mobile/components/action-circles/action-circles.js.map +1 -0
- package/mobile/components/action-circles/index.d.ts +1 -22
- package/mobile/components/action-circles/index.js +3 -29
- package/mobile/components/action-circles/index.js.map +1 -0
- package/mobile/components/action-list/action-list.d.ts +29 -0
- package/mobile/components/action-list/action-list.js +40 -0
- package/mobile/components/action-list/action-list.js.map +1 -0
- package/mobile/components/action-list/index.d.ts +1 -23
- package/mobile/components/action-list/index.js +5 -34
- package/mobile/components/action-list/index.js.map +1 -0
- package/mobile/components/breadcrumbs/breadcrumbs.d.ts +12 -0
- package/mobile/components/breadcrumbs/breadcrumbs.js +17 -0
- package/mobile/components/breadcrumbs/breadcrumbs.js.map +1 -0
- package/mobile/components/breadcrumbs/index.d.ts +1 -13
- package/mobile/components/breadcrumbs/index.js +3 -13
- package/mobile/components/breadcrumbs/index.js.map +1 -0
- package/mobile/components/person-info/index.d.ts +1 -44
- package/mobile/components/person-info/index.js +4 -55
- package/mobile/components/person-info/index.js.map +1 -0
- package/mobile/components/person-info/person-info.d.ts +46 -0
- package/mobile/components/person-info/person-info.js +41 -0
- package/mobile/components/person-info/person-info.js.map +1 -0
- package/mobile/components/person-info/{person-info.module.scss → person-info.m.scss} +9 -16
- package/mobile/components/product-row/index.d.ts +1 -41
- package/mobile/components/product-row/index.js +3 -56
- package/mobile/components/product-row/index.js.map +1 -0
- package/mobile/components/product-row/product-row.d.ts +40 -0
- package/mobile/components/product-row/product-row.js +29 -0
- package/mobile/components/product-row/product-row.js.map +1 -0
- package/mobile/components/product-slider/index.d.ts +1 -17
- package/mobile/components/product-slider/index.js +3 -57
- package/mobile/components/product-slider/index.js.map +1 -0
- package/mobile/components/product-slider/product-slider.d.ts +17 -0
- package/mobile/components/product-slider/product-slider.js +37 -0
- package/mobile/components/product-slider/product-slider.js.map +1 -0
- package/mobile/components/search-bar/index.d.ts +1 -39
- package/mobile/components/search-bar/index.js +4 -104
- package/mobile/components/search-bar/index.js.map +1 -0
- package/mobile/components/search-bar/search-bar.d.ts +39 -0
- package/mobile/components/search-bar/search-bar.js +64 -0
- package/mobile/components/search-bar/search-bar.js.map +1 -0
- package/mobile/components/search-bar/{search-bar.module.scss → search-bar.m.scss} +6 -6
- package/mobile/components/select-screen/index.d.ts +1 -20
- package/mobile/components/select-screen/index.js +4 -65
- package/mobile/components/select-screen/index.js.map +1 -0
- package/mobile/components/select-screen/select-screen.d.ts +20 -0
- package/mobile/components/select-screen/select-screen.js +31 -0
- package/mobile/components/select-screen/select-screen.js.map +1 -0
- package/package.json +40 -52
- package/common/components/badge/badge.module.scss +0 -40
- package/common/components/intractive-image/interactive-image.d.ts +0 -15
- package/common/components/intractive-image/interactive-image.js +0 -96
- 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/types.d.ts +0 -1
- package/desktop/components/breadcrumbs/square-arrow-down.svg +0 -8
- 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/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/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/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/common/components/badge-list/{badge-list.module.scss → badge-list.m.scss} +0 -0
- /package/common/components/{intractive-image → interactive-image}/index.d.ts +0 -0
- /package/common/components/{intractive-image → interactive-image}/interactive-image-util.scss +0 -0
- /package/common/components/{intractive-image/interactive-image.module.scss → interactive-image/interactive-image.m.scss} +0 -0
- /package/common/components/rating-counter/{rating-counter.module.scss → rating-counter.m.scss} +0 -0
- /package/desktop/components/gallery-modal/components/{review-info.module.scss → review-info.m.scss} +0 -0
- /package/desktop/components/gallery-modal/components/{thumbnail.module.scss → thumbnail.m.scss} +0 -0
- /package/desktop/components/product-card/{product-card.module.scss → product-card.m.scss} +0 -0
- /package/desktop/components/promotion-card/{banner-title.module.scss → banner-title.m.scss} +0 -0
- /package/desktop/components/promotion-card/{placeholder.module.scss → placeholder.m.scss} +0 -0
- /package/mobile/components/action-circles/{action-circles.module.scss → action-circles.m.scss} +0 -0
- /package/mobile/components/action-list/{action-list.module.scss → action-list.m.scss} +0 -0
- /package/mobile/components/breadcrumbs/{breadcrumbs.module.scss → breadcrumbs.m.scss} +0 -0
- /package/mobile/components/product-row/{product-row.module.scss → product-row.m.scss} +0 -0
- /package/mobile/components/product-slider/{product-slider.module.scss → product-slider.m.scss} +0 -0
- /package/mobile/components/select-screen/{select-screen.module.scss → select-screen.m.scss} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"thumbnail.js","sourceRoot":"","sources":["../../../../../src/desktop/components/gallery-modal/components/thumbnail.tsx"],"names":[],"mappings":";;;;;;;AAEA,mDAA+C;AAC/C,wFAAmE;AACnE,2DAAyC;AACzC,0EAAwC;AACxC,0HAAwF;AAExF,MAAM,EAAE,GAAG,cAAU,CAAC,IAAI,CAAC,0BAAM,CAAC,CAAC;AAWnC;;;;GAIG;AACI,MAAM,SAAS,GAAG,CAAC,EAAE,IAAI,EAAE,GAAG,EAAE,GAAG,EAAE,OAAO,EAAE,OAAO,EAAE,SAAS,EAAkB,EAAE,EAAE,CAAC,CAC5F,oCACE,SAAS,EAAE,EAAE,CAAC,MAAM,EAAE,IAAI,KAAK,OAAO,IAAI,QAAQ,EAAE,EAAE,OAAO,EAAE,EAAE,SAAS,CAAC,EAC3E,OAAO,EAAE,OAAO,iBACJ,yBAAyB,aAEpC,IAAI,KAAK,KAAK,IAAI,uBAAC,+BAAW,IAAC,IAAI,EAAC,cAAc,GAAG,EACrD,IAAI,KAAK,OAAO,IAAI,uBAAC,cAAO,IAAC,KAAK,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,IAAI,EAAC,cAAc,GAAG,EAC1E,GAAG,IAAI,CACN,uBAAC,4BAAY,IAAC,SAAS,EAAE,EAAE,CAAC,eAAe,CAAC,YAC1C,gCAAK,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,GAAI,GACd,CAChB,IACM,CACV,CAAC;AAdW,QAAA,SAAS,aAcpB"}
|
|
@@ -3,3 +3,4 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.GalleryModal = void 0;
|
|
4
4
|
const gallery_modal_1 = require("./components/gallery-modal");
|
|
5
5
|
Object.defineProperty(exports, "GalleryModal", { enumerable: true, get: function () { return gallery_modal_1.GalleryModal; } });
|
|
6
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/desktop/components/gallery-modal/index.ts"],"names":[],"mappings":";;;AAAA,8DAA6E;AAIpE,6FAJA,4BAAY,OAIA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/desktop/components/gallery-modal/types.ts"],"names":[],"mappings":""}
|
|
@@ -1,16 +1,18 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { RefObject } from 'react';
|
|
2
|
+
type Status = 'load' | 'done' | 'fail';
|
|
2
3
|
/**
|
|
3
4
|
* Хук, вернет true когда все фото будут загружен.
|
|
4
5
|
* @param srcList Список адресов фото.
|
|
5
6
|
* @return Загружены ли все фото.
|
|
6
7
|
*/
|
|
7
|
-
export declare
|
|
8
|
+
export declare function useImagesLoad(srcList: string[]): Status;
|
|
8
9
|
/**
|
|
9
10
|
* Хук, вернет размер квадрата вписанного в область окна галереи фото по макетам.
|
|
10
11
|
* @param areaRef Реф с элементом.
|
|
11
12
|
* @param options Опции.
|
|
12
13
|
* @return Размер или null.
|
|
13
14
|
*/
|
|
14
|
-
export declare const useSquareFit: (areaRef:
|
|
15
|
+
export declare const useSquareFit: (areaRef: RefObject<HTMLDivElement | null>, { hasReview }: {
|
|
15
16
|
hasReview: boolean;
|
|
16
17
|
}) => number | null;
|
|
18
|
+
export {};
|
|
@@ -1,28 +1,37 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
3
|
exports.useSquareFit = exports.useImagesLoad = void 0;
|
|
7
4
|
const react_1 = require("react");
|
|
8
|
-
const
|
|
5
|
+
const helpers_1 = require("@sima-land/ui-nucleons/helpers");
|
|
6
|
+
const hooks_1 = require("@sima-land/ui-nucleons/hooks");
|
|
9
7
|
/**
|
|
10
8
|
* Хук, вернет true когда все фото будут загружен.
|
|
11
9
|
* @param srcList Список адресов фото.
|
|
12
10
|
* @return Загружены ли все фото.
|
|
13
11
|
*/
|
|
14
|
-
|
|
12
|
+
function useImagesLoad(srcList) {
|
|
13
|
+
const [failed, setFailed] = (0, react_1.useState)(false);
|
|
15
14
|
const [loadedCount, setLoadedCount] = (0, react_1.useState)(0);
|
|
15
|
+
(0, hooks_1.useIsomorphicLayoutEffect)(() => {
|
|
16
|
+
setFailed(false);
|
|
17
|
+
}, srcList);
|
|
16
18
|
(0, react_1.useEffect)(() => {
|
|
17
19
|
srcList.forEach(src => {
|
|
18
20
|
const image = new Image();
|
|
19
21
|
image.onload = () => setLoadedCount(c => c + 1);
|
|
22
|
+
image.onerror = () => setFailed(true);
|
|
20
23
|
image.src = src;
|
|
21
24
|
});
|
|
22
25
|
return () => setLoadedCount(0);
|
|
23
26
|
}, srcList);
|
|
24
|
-
|
|
25
|
-
|
|
27
|
+
if (loadedCount === srcList.length) {
|
|
28
|
+
return 'done';
|
|
29
|
+
}
|
|
30
|
+
if (failed) {
|
|
31
|
+
return 'fail';
|
|
32
|
+
}
|
|
33
|
+
return 'load';
|
|
34
|
+
}
|
|
26
35
|
exports.useImagesLoad = useImagesLoad;
|
|
27
36
|
/**
|
|
28
37
|
* Хук, вернет размер квадрата вписанного в область окна галереи фото по макетам.
|
|
@@ -44,8 +53,9 @@ const useSquareFit = (areaRef, { hasReview }) => {
|
|
|
44
53
|
}
|
|
45
54
|
};
|
|
46
55
|
calc();
|
|
47
|
-
return (0,
|
|
56
|
+
return (0, helpers_1.on)(window, 'resize', () => window.requestAnimationFrame(calc));
|
|
48
57
|
}, [areaRef, hasReview]);
|
|
49
58
|
return size;
|
|
50
59
|
};
|
|
51
60
|
exports.useSquareFit = useSquareFit;
|
|
61
|
+
//# sourceMappingURL=utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../../src/desktop/components/gallery-modal/utils.ts"],"names":[],"mappings":";;;AAAA,iCAAuD;AACvD,4DAAoD;AACpD,wDAAyE;AAIzE;;;;GAIG;AACH,SAAgB,aAAa,CAAC,OAAiB;IAC7C,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,IAAA,gBAAQ,EAAC,KAAK,CAAC,CAAC;IAC5C,MAAM,CAAC,WAAW,EAAE,cAAc,CAAC,GAAG,IAAA,gBAAQ,EAAS,CAAC,CAAC,CAAC;IAE1D,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AwD;gBACxD,MAAM,UAAU,GAAG,OAAO,CAAC,OAAO,CAAC,WAAW,GAAG,UAAU,CAAC;gBAC5D,MAAM,WAAW,GAAG,OAAO,CAAC,OAAO,CAAC,YAAY,GAAG,CAAC,SAAS,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,yBAAyB;gBAEpG,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,UAAU,EAAE,WAAW,CAAC,CAAC,CAAC;YAC7C,CAAC;QACH,CAAC,CAAC;QAEF,IAAI,EAAE,CAAC;QAEP,OAAO,IAAA,YAAE,EAAC,MAAM,EAAE,QAAQ,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,qBAAqB,CAAC,IAAI,CAAC,CAAC,CAAC;IACxE,CAAC,EAAE,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC,CAAC;IAEzB,OAAO,IAAI,CAAC;AACd,CAAC,CAAC;AA1BW,QAAA,YAAY,gBA0BvB"}
|
|
@@ -1,41 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import { ModalProps } from '@sima-land/ui-nucleons/modal';
|
|
3
|
-
interface PersonInfoProps {
|
|
4
|
-
/** Имя. */
|
|
5
|
-
name: string;
|
|
6
|
-
/** Должность. */
|
|
7
|
-
appointment: string;
|
|
8
|
-
/** Ссылка на фото. */
|
|
9
|
-
photoUrl?: string;
|
|
10
|
-
/** Почта. */
|
|
11
|
-
email?: string;
|
|
12
|
-
/** Skype. */
|
|
13
|
-
skype?: string;
|
|
14
|
-
/** Социальные сети. */
|
|
15
|
-
social?: any[];
|
|
16
|
-
/** Ссылка на рабочий номер телефона. */
|
|
17
|
-
phoneHref?: string;
|
|
18
|
-
/** Рабочий номер телефона. */
|
|
19
|
-
phoneText?: string;
|
|
20
|
-
/** Ссылка на сотовый номер телефона. */
|
|
21
|
-
secondPhoneHref?: string;
|
|
22
|
-
/** Сотовый номер телефона. */
|
|
23
|
-
secondPhoneText?: string;
|
|
24
|
-
/** Свойства ссылки под именем. */
|
|
25
|
-
arbitraryLinkProps?: any;
|
|
26
|
-
}
|
|
27
|
-
export interface PersonModalProps extends PersonInfoProps {
|
|
28
|
-
/** Сработает при нажатии на кнопку "Закрыть". */
|
|
29
|
-
onClose: () => void;
|
|
30
|
-
/** Нужно ли блокировать прокрутку пока открыто окно. */
|
|
31
|
-
withScrollDisable?: ModalProps['withScrollDisable'];
|
|
32
|
-
/** Опции блокировки прокрутки. */
|
|
33
|
-
scrollDisableOptions?: ModalProps['scrollDisableOptions'];
|
|
34
|
-
}
|
|
35
|
-
/**
|
|
36
|
-
* Информация о персоне.
|
|
37
|
-
* @param props Свойства.
|
|
38
|
-
* @return Элемент.
|
|
39
|
-
*/
|
|
40
|
-
export declare function PersonInfo({ name, appointment, photoUrl, email, skype, social, phoneHref, phoneText, secondPhoneHref, secondPhoneText, arbitraryLinkProps, }: PersonInfoProps): JSX.Element;
|
|
41
|
-
export {};
|
|
1
|
+
export { type PersonModalProps, PersonInfo } from './person-info';
|
|
@@ -1,46 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
3
|
exports.PersonInfo = void 0;
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
const text_1 = require("@sima-land/ui-nucleons/text");
|
|
11
|
-
const link_1 = require("@sima-land/ui-nucleons/link");
|
|
12
|
-
const bind_1 = __importDefault(require("classnames/bind"));
|
|
13
|
-
const person_info_module_scss_1 = __importDefault(require("./person-info.module.scss"));
|
|
14
|
-
const cx = bind_1.default.bind(person_info_module_scss_1.default);
|
|
15
|
-
/**
|
|
16
|
-
* Информация о персоне.
|
|
17
|
-
* @param props Свойства.
|
|
18
|
-
* @return Элемент.
|
|
19
|
-
*/
|
|
20
|
-
function PersonInfo({ name, appointment, photoUrl, email, skype, social, phoneHref, phoneText, secondPhoneHref, secondPhoneText, arbitraryLinkProps, }) {
|
|
21
|
-
return (react_1.default.createElement("div", { className: cx('main') },
|
|
22
|
-
react_1.default.createElement(box_1.Box, { marginBottom: 6 },
|
|
23
|
-
react_1.default.createElement(user_1.UserAvatar, { title: name, imageUrl: photoUrl, size: 104 })),
|
|
24
|
-
react_1.default.createElement(box_1.Box, { marginBottom: 1 },
|
|
25
|
-
react_1.default.createElement(text_1.Text, { color: 'basic-gray38', size: 14, weight: 400 }, appointment)),
|
|
26
|
-
react_1.default.createElement("div", { className: cx('name') }, name),
|
|
27
|
-
arbitraryLinkProps && (react_1.default.createElement(box_1.Box, { marginTop: 2 },
|
|
28
|
-
react_1.default.createElement(text_1.Text, { size: 12, weight: 600 },
|
|
29
|
-
react_1.default.createElement(link_1.Link, Object.assign({}, arbitraryLinkProps))))),
|
|
30
|
-
react_1.default.createElement("div", { className: cx('contacts') },
|
|
31
|
-
email && (react_1.default.createElement("span", { className: cx('contacts-item') },
|
|
32
|
-
'Email: ',
|
|
33
|
-
react_1.default.createElement(link_1.Link, { color: 'basic-gray87', href: `mailto:${email}`, children: email }))),
|
|
34
|
-
Array.isArray(social) && social.length > 0 && (react_1.default.createElement("span", { className: cx('contacts-item') },
|
|
35
|
-
"\u0421\u043E\u0446. \u0441\u0435\u0442\u0438:",
|
|
36
|
-
' ',
|
|
37
|
-
social.map((props, key) => (react_1.default.createElement(link_1.Link, Object.assign({ className: cx('inline'), key: key, color: 'basic-gray87', target: '_blank', rel: 'nofollow' }, props)))))),
|
|
38
|
-
skype && (react_1.default.createElement("span", { className: cx('contacts-item') },
|
|
39
|
-
'Skype: ',
|
|
40
|
-
react_1.default.createElement(link_1.Link, { color: 'basic-gray87', href: `skype:${skype}`, children: skype }))),
|
|
41
|
-
phoneText && (react_1.default.createElement("span", { className: cx('contacts-item') },
|
|
42
|
-
react_1.default.createElement(link_1.Link, { color: 'basic-gray87', href: phoneHref, children: phoneText }))),
|
|
43
|
-
secondPhoneText && (react_1.default.createElement("span", { className: cx('contacts-item') },
|
|
44
|
-
react_1.default.createElement(link_1.Link, { color: 'basic-gray87', href: secondPhoneHref, children: secondPhoneText }))))));
|
|
45
|
-
}
|
|
46
|
-
exports.PersonInfo = PersonInfo;
|
|
4
|
+
var person_info_1 = require("./person-info");
|
|
5
|
+
Object.defineProperty(exports, "PersonInfo", { enumerable: true, get: function () { return person_info_1.PersonInfo; } });
|
|
6
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/desktop/components/person-info/index.ts"],"names":[],"mappings":";;;AAAA,6CAAkE;AAAlC,yGAAA,UAAU,OAAA"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { ModalBodyProps } from '@sima-land/ui-nucleons/modal';
|
|
2
|
+
interface PersonInfoProps {
|
|
3
|
+
/** Идентификатор. */
|
|
4
|
+
personId?: number;
|
|
5
|
+
/** Имя. */
|
|
6
|
+
name: string;
|
|
7
|
+
/** Должность. */
|
|
8
|
+
appointment: string;
|
|
9
|
+
/** Ссылка на фото. */
|
|
10
|
+
photoUrl?: string;
|
|
11
|
+
/** Почта. */
|
|
12
|
+
email?: string;
|
|
13
|
+
/** Skype. */
|
|
14
|
+
skype?: string;
|
|
15
|
+
/** Социальные сети. */
|
|
16
|
+
social?: any[];
|
|
17
|
+
/** Ссылка на рабочий номер телефона. */
|
|
18
|
+
phoneHref?: string;
|
|
19
|
+
/** Рабочий номер телефона. */
|
|
20
|
+
phoneText?: string;
|
|
21
|
+
/** Ссылка на сотовый номер телефона. */
|
|
22
|
+
secondPhoneHref?: string;
|
|
23
|
+
/** Сотовый номер телефона. */
|
|
24
|
+
secondPhoneText?: string;
|
|
25
|
+
/** Свойства ссылки под именем. */
|
|
26
|
+
arbitraryLinkProps?: any;
|
|
27
|
+
}
|
|
28
|
+
export interface PersonModalProps extends PersonInfoProps {
|
|
29
|
+
/** Сработает при нажатии на кнопку "Закрыть". */
|
|
30
|
+
onClose: () => void;
|
|
31
|
+
/** Нужно ли блокировать прокрутку пока открыто окно. */
|
|
32
|
+
withScrollDisable?: ModalBodyProps['withScrollDisable'];
|
|
33
|
+
/** Опции блокировки прокрутки. */
|
|
34
|
+
scrollDisableOptions?: ModalBodyProps['scrollDisableOptions'];
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Информация о персоне.
|
|
38
|
+
* @param props Свойства.
|
|
39
|
+
* @return Элемент.
|
|
40
|
+
*/
|
|
41
|
+
export declare function PersonInfo({ personId, name, appointment, photoUrl, email, skype, social, phoneHref, phoneText, secondPhoneHref, secondPhoneText, arbitraryLinkProps, }: PersonInfoProps): import("react/jsx-runtime").JSX.Element;
|
|
42
|
+
export {};
|
|
@@ -0,0 +1,24 @@
|
|
|
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.PersonInfo = void 0;
|
|
7
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
|
+
const avatar_1 = require("@sima-land/ui-nucleons/avatar");
|
|
9
|
+
const box_1 = require("@sima-land/ui-nucleons/box");
|
|
10
|
+
const text_1 = require("@sima-land/ui-nucleons/text");
|
|
11
|
+
const link_1 = require("@sima-land/ui-nucleons/link");
|
|
12
|
+
const bind_1 = __importDefault(require("classnames/bind"));
|
|
13
|
+
const person_info_m_scss_1 = __importDefault(require("./person-info.m.scss"));
|
|
14
|
+
const cx = bind_1.default.bind(person_info_m_scss_1.default);
|
|
15
|
+
/**
|
|
16
|
+
* Информация о персоне.
|
|
17
|
+
* @param props Свойства.
|
|
18
|
+
* @return Элемент.
|
|
19
|
+
*/
|
|
20
|
+
function PersonInfo({ personId, name, appointment, photoUrl, email, skype, social, phoneHref, phoneText, secondPhoneHref, secondPhoneText, arbitraryLinkProps, }) {
|
|
21
|
+
return ((0, jsx_runtime_1.jsxs)("div", { className: cx('main'), children: [(0, jsx_runtime_1.jsx)(box_1.Box, { marginBottom: 6, children: (0, jsx_runtime_1.jsx)(avatar_1.Avatar, { ...(0, avatar_1.getUserAvatarProps)({ id: personId, name, image: photoUrl }) }) }), (0, jsx_runtime_1.jsx)(box_1.Box, { marginBottom: 1, children: (0, jsx_runtime_1.jsx)(text_1.Text, { color: 'basic-gray38', size: 14, weight: 400, children: appointment }) }), (0, jsx_runtime_1.jsx)("div", { className: cx('name'), children: name }), arbitraryLinkProps && ((0, jsx_runtime_1.jsx)(box_1.Box, { marginTop: 2, children: (0, jsx_runtime_1.jsx)(text_1.Text, { size: 12, weight: 600, children: (0, jsx_runtime_1.jsx)(link_1.Link, { ...arbitraryLinkProps }) }) })), (0, jsx_runtime_1.jsxs)("div", { className: cx('contacts'), children: [email && ((0, jsx_runtime_1.jsxs)("span", { className: cx('contacts-item'), children: ['Email: ', (0, jsx_runtime_1.jsx)(link_1.Link, { color: 'basic-gray87', href: `mailto:${email}`, children: email })] })), Array.isArray(social) && social.length > 0 && ((0, jsx_runtime_1.jsxs)("span", { className: cx('contacts-item'), children: ["\u0421\u043E\u0446. \u0441\u0435\u0442\u0438:", ' ', social.map((props, key) => ((0, jsx_runtime_1.jsx)(link_1.Link, { className: cx('inline'), color: 'basic-gray87', target: '_blank', rel: 'nofollow', ...props }, key)))] })), skype && ((0, jsx_runtime_1.jsxs)("span", { className: cx('contacts-item'), children: ['Skype: ', (0, jsx_runtime_1.jsx)(link_1.Link, { color: 'basic-gray87', href: `skype:${skype}`, children: skype })] })), phoneText && ((0, jsx_runtime_1.jsx)("span", { className: cx('contacts-item'), children: (0, jsx_runtime_1.jsx)(link_1.Link, { color: 'basic-gray87', href: phoneHref, children: phoneText }) })), secondPhoneText && ((0, jsx_runtime_1.jsx)("span", { className: cx('contacts-item'), children: (0, jsx_runtime_1.jsx)(link_1.Link, { color: 'basic-gray87', href: secondPhoneHref, children: secondPhoneText }) }))] })] }));
|
|
22
|
+
}
|
|
23
|
+
exports.PersonInfo = PersonInfo;
|
|
24
|
+
//# sourceMappingURL=person-info.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"person-info.js","sourceRoot":"","sources":["../../../../src/desktop/components/person-info/person-info.tsx"],"names":[],"mappings":";;;;;;;AAAA,0DAA2E;AAC3E,oDAAiD;AACjD,sDAAmD;AACnD,sDAAmD;AAEnD,2DAAyC;AACzC,8EAA0C;AAmD1C,MAAM,EAAE,GAAG,cAAU,CAAC,IAAI,CAAC,4BAAM,CAAC,CAAC;AAEnC;;;;GAIG;AACH,SAAgB,UAAU,CAAC,EACzB,QAAQ,EACR,IAAI,EACJ,WAAW,EACX,QAAQ,EACR,KAAK,EACL,KAAK,EACL,MAAM,EACN,SAAS,EACT,SAAS,EACT,eAAe,EACf,eAAe,EACf,kBAAkB,GACF;IAChB,OAAO,CACL,iCAAK,SAAS,EAAE,EAAE,CAAC,MAAM,CAAC,aACxB,uBAAC,SAAG,IAAC,YAAY,EAAE,CAAC,YAClB,uBAAC,eAAM,OAAK,IAAA,2BAAkB,EAAC,EAAE,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC,GAAI,GACvE,EAEN,uBAAC,SAAG,IAAC,YAAY,EAAE,CAAC,YAClB,uBAAC,WAAI,IAAC,KAAK,EAAC,cAAc,EAAC,IAAI,EAAE,EAAE,EAAE,MAAM,EAAE,GAAG,YAC7C,WAAW,GACP,GACH,EAEN,gCAAK,SAAS,EAAE,EAAE,CAAC,MAAM,CAAC,YAAG,IAAI,GAAO,EAEvC,kBAAkB,IAAI,CACrB,uBAAC,SAAG,IAAC,SAAS,EAAE,CAAC,YACf,uBAAC,WAAI,IAAC,IAAI,EAAE,EAAE,EAAE,MAAM,EAAE,GAAG,YACzB,uBAAC,WAAI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C1E,CACR,IACG,IACF,CACP,CAAC;AACJ,CAAC;AA7ED,gCA6EC"}
|
|
@@ -1,26 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import { PlateProps } from '@sima-land/ui-nucleons/plate';
|
|
4
|
-
export type ProductCardChildren = React.ReactElement<ProductInfoProps, typeof ProductInfo>;
|
|
5
|
-
export interface ProductCardProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
6
|
-
children: ProductCardChildren;
|
|
7
|
-
}
|
|
8
|
-
export declare const HoverCard: React.ForwardRefExoticComponent<PlateProps & React.RefAttributes<HTMLDivElement | null>>;
|
|
9
|
-
/**
|
|
10
|
-
* Карточка данных товара с расширенной инф-ой при наведении.
|
|
11
|
-
* @param props Свойства.
|
|
12
|
-
* @return Элемент.
|
|
13
|
-
*/
|
|
14
|
-
export declare const ProductCard: ({ children, className, ...props }: ProductCardProps) => JSX.Element;
|
|
15
|
-
/**
|
|
16
|
-
* Фильтрует содержимое карточки для вывода состояния без наведения.
|
|
17
|
-
* @param el Элемент.
|
|
18
|
-
* @return Элемент.
|
|
19
|
-
*/
|
|
20
|
-
export declare const reduceBaseInfo: (el: ProductCardChildren) => React.FunctionComponentElement<ProductInfoProps>;
|
|
21
|
-
/**
|
|
22
|
-
* Получив содержимое карточки фильтрует/меняет его для вывода в карточке при наведении.
|
|
23
|
-
* @param el Содержимое.
|
|
24
|
-
* @return Элемент.
|
|
25
|
-
*/
|
|
26
|
-
export declare const reduceHoverInfo: (el: ProductCardChildren) => React.FunctionComponentElement<ProductInfoProps>;
|
|
1
|
+
export type { ProductCardProps } from './types';
|
|
2
|
+
export { ProductCard, HoverCard, reduceBaseInfo, reduceHoverInfo } from './product-card';
|
|
@@ -1,105 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
26
|
-
var t = {};
|
|
27
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
28
|
-
t[p] = s[p];
|
|
29
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
30
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
31
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
32
|
-
t[p[i]] = s[p[i]];
|
|
33
|
-
}
|
|
34
|
-
return t;
|
|
35
|
-
};
|
|
36
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
37
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
38
|
-
};
|
|
39
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
40
|
-
exports.reduceHoverInfo = exports.reduceBaseInfo = exports.
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
exports.HoverCard = (0, react_1.forwardRef)((props, ref) => {
|
|
48
|
-
const layer = (0, layer_1.useLayer)() + 1;
|
|
49
|
-
return (react_1.default.createElement(plate_1.Plate, Object.assign({}, props, { style: Object.assign(Object.assign({}, props.style), { zIndex: layer }), ref: ref, rounds: 'm', shadow: 'z4', className: (0, classnames_1.default)(product_card_module_scss_1.default.card, props.className), "data-testid": 'product-card:hover-card' })));
|
|
50
|
-
});
|
|
51
|
-
/**
|
|
52
|
-
* Карточка данных товара с расширенной инф-ой при наведении.
|
|
53
|
-
* @param props Свойства.
|
|
54
|
-
* @return Элемент.
|
|
55
|
-
*/
|
|
56
|
-
const ProductCard = (_a) => {
|
|
57
|
-
var { children, className } = _a, props = __rest(_a, ["children", "className"]);
|
|
58
|
-
const [hovered, toggle] = (0, react_1.useState)(false);
|
|
59
|
-
return (react_1.default.createElement("div", Object.assign({}, props, { "data-testid": 'product-card', className: (0, classnames_1.default)(product_card_module_scss_1.default.root, className), onMouseEnter: () => toggle(true),
|
|
60
|
-
// вешаем onMouseLeave на корневой элемент так как в Chrome проблемы если вешать на "product-card:info"
|
|
61
|
-
onMouseLeave: () => toggle(false) }),
|
|
62
|
-
react_1.default.createElement("div", { "data-testid": 'product-card:info' }, (0, exports.reduceBaseInfo)(children)),
|
|
63
|
-
hovered && react_1.default.createElement(exports.HoverCard, null, (0, exports.reduceHoverInfo)(children))));
|
|
64
|
-
};
|
|
65
|
-
exports.ProductCard = ProductCard;
|
|
66
|
-
/**
|
|
67
|
-
* Фильтрует содержимое карточки для вывода состояния без наведения.
|
|
68
|
-
* @param el Элемент.
|
|
69
|
-
* @return Элемент.
|
|
70
|
-
*/
|
|
71
|
-
const reduceBaseInfo = (el) => (0, react_1.cloneElement)(el, {
|
|
72
|
-
children: react_1.Children.map(el.props.children, child => {
|
|
73
|
-
let result;
|
|
74
|
-
if ((0, react_1.isValidElement)(child)) {
|
|
75
|
-
switch (child.type) {
|
|
76
|
-
// игнорируем кнопки-иконки на изображении
|
|
77
|
-
case product_info_1.Parts.Image:
|
|
78
|
-
result = (0, react_1.cloneElement)(child, { children: undefined });
|
|
79
|
-
break;
|
|
80
|
-
// игнорируем футер
|
|
81
|
-
case product_info_1.Parts.Footer:
|
|
82
|
-
result = null;
|
|
83
|
-
break;
|
|
84
|
-
// остальное оставляем без изменений
|
|
85
|
-
default:
|
|
86
|
-
result = child;
|
|
87
|
-
break;
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
return result;
|
|
91
|
-
}),
|
|
92
|
-
});
|
|
93
|
-
exports.reduceBaseInfo = reduceBaseInfo;
|
|
94
|
-
/**
|
|
95
|
-
* Получив содержимое карточки фильтрует/меняет его для вывода в карточке при наведении.
|
|
96
|
-
* @param el Содержимое.
|
|
97
|
-
* @return Элемент.
|
|
98
|
-
*/
|
|
99
|
-
const reduceHoverInfo = (el) => (0, react_1.cloneElement)(el, {
|
|
100
|
-
// при наведении у изображения строго непрозрачность = 1
|
|
101
|
-
children: react_1.Children.map(el.props.children, child => (0, react_1.isValidElement)(child) && child.type === product_info_1.Parts.Image
|
|
102
|
-
? (0, react_1.cloneElement)(child, { opacity: 1 })
|
|
103
|
-
: child),
|
|
104
|
-
});
|
|
105
|
-
exports.reduceHoverInfo = reduceHoverInfo;
|
|
3
|
+
exports.reduceHoverInfo = exports.reduceBaseInfo = exports.HoverCard = exports.ProductCard = void 0;
|
|
4
|
+
var product_card_1 = require("./product-card");
|
|
5
|
+
Object.defineProperty(exports, "ProductCard", { enumerable: true, get: function () { return product_card_1.ProductCard; } });
|
|
6
|
+
Object.defineProperty(exports, "HoverCard", { enumerable: true, get: function () { return product_card_1.HoverCard; } });
|
|
7
|
+
Object.defineProperty(exports, "reduceBaseInfo", { enumerable: true, get: function () { return product_card_1.reduceBaseInfo; } });
|
|
8
|
+
Object.defineProperty(exports, "reduceHoverInfo", { enumerable: true, get: function () { return product_card_1.reduceHoverInfo; } });
|
|
9
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/desktop/components/product-card/index.ts"],"names":[],"mappings":";;;AACA,+CAAyF;AAAhF,2GAAA,WAAW,OAAA;AAAE,yGAAA,SAAS,OAAA;AAAE,8GAAA,cAAc,OAAA;AAAE,+GAAA,eAAe,OAAA"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ProductCardChildren, ProductCardProps, ReduceBaseInfoOptions } from './types';
|
|
3
|
+
import { PlateProps } from '@sima-land/ui-nucleons/plate';
|
|
4
|
+
/**
|
|
5
|
+
* Карточка данных товара с расширенной инф-ой при наведении.
|
|
6
|
+
* @param props Свойства.
|
|
7
|
+
* @return Элемент.
|
|
8
|
+
*/
|
|
9
|
+
export declare function ProductCard({ reduceBaseInfo: reduceBaseInfoProp, reduceHoverInfo: reduceHoverInfoProp, children, className, ...props }: ProductCardProps): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export declare const HoverCard: import("react").ForwardRefExoticComponent<PlateProps & import("react").RefAttributes<HTMLDivElement | null>>;
|
|
11
|
+
/**
|
|
12
|
+
* Фильтрует содержимое карточки для вывода состояния без наведения.
|
|
13
|
+
* @param element Элемент.
|
|
14
|
+
* @param options Опции.
|
|
15
|
+
* @return Элемент.
|
|
16
|
+
*/
|
|
17
|
+
export declare function reduceBaseInfo(element: ProductCardChildren, { hideImageButtons, hideFooter }?: ReduceBaseInfoOptions): import("react").FunctionComponentElement<import("../../../common/components/product-info").ProductInfoProps>;
|
|
18
|
+
/**
|
|
19
|
+
* Получив содержимое карточки фильтрует/меняет его для вывода в карточке при наведении.
|
|
20
|
+
* @param element Содержимое.
|
|
21
|
+
* @return Элемент.
|
|
22
|
+
*/
|
|
23
|
+
export declare function reduceHoverInfo(element: ProductCardChildren): import("react").FunctionComponentElement<import("../../../common/components/product-info").ProductInfoProps>;
|
|
@@ -0,0 +1,94 @@
|
|
|
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.reduceHoverInfo = exports.reduceBaseInfo = exports.HoverCard = exports.ProductCard = void 0;
|
|
7
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
|
+
const react_1 = require("react");
|
|
9
|
+
const product_info_1 = require("../../../common/components/product-info");
|
|
10
|
+
const plate_1 = require("@sima-land/ui-nucleons/plate");
|
|
11
|
+
const helpers_1 = require("@sima-land/ui-nucleons/helpers");
|
|
12
|
+
const bind_1 = __importDefault(require("classnames/bind"));
|
|
13
|
+
const product_card_m_scss_1 = __importDefault(require("./product-card.m.scss"));
|
|
14
|
+
const cx = bind_1.default.bind(product_card_m_scss_1.default);
|
|
15
|
+
/**
|
|
16
|
+
* Карточка данных товара с расширенной инф-ой при наведении.
|
|
17
|
+
* @param props Свойства.
|
|
18
|
+
* @return Элемент.
|
|
19
|
+
*/
|
|
20
|
+
function ProductCard({
|
|
21
|
+
// @todo не совсем правильно заставлять работать с внутренностями реакта - надо придумать что-то более простое
|
|
22
|
+
reduceBaseInfo: reduceBaseInfoProp = reduceBaseInfo, reduceHoverInfo: reduceHoverInfoProp = reduceHoverInfo, children, className, ...props }) {
|
|
23
|
+
const [hovered, toggle] = (0, react_1.useState)(false);
|
|
24
|
+
return ((0, jsx_runtime_1.jsxs)("div", { ...props, "data-testid": 'product-card', className: cx('root', className), onMouseEnter: () => toggle(true),
|
|
25
|
+
// ВАЖНО: вешаем onMouseLeave на корневой элемент так как в Chrome проблемы если вешать на "product-card:info"
|
|
26
|
+
onMouseLeave: () => toggle(false), children: [(0, jsx_runtime_1.jsx)("div", { "data-testid": 'product-card:info', children: reduceBaseInfoProp(children) }), hovered && (0, jsx_runtime_1.jsx)(exports.HoverCard, { children: reduceHoverInfoProp(children) })] }));
|
|
27
|
+
}
|
|
28
|
+
exports.ProductCard = ProductCard;
|
|
29
|
+
exports.HoverCard = (0, react_1.forwardRef)((props, ref) => {
|
|
30
|
+
const layer = (0, helpers_1.useLayer)() + 1;
|
|
31
|
+
return ((0, jsx_runtime_1.jsx)(plate_1.Plate, { ...props, style: { ...props.style, zIndex: layer }, ref: ref, rounds: 'm', shadow: 'z4', className: cx('card', props.className), "data-testid": 'product-card:hover-card' }));
|
|
32
|
+
});
|
|
33
|
+
/**
|
|
34
|
+
* Фильтрует содержимое карточки для вывода состояния без наведения.
|
|
35
|
+
* @param element Элемент.
|
|
36
|
+
* @param options Опции.
|
|
37
|
+
* @return Элемент.
|
|
38
|
+
*/
|
|
39
|
+
function reduceBaseInfo(element, { hideImageButtons = true, hideFooter = true } = {}) {
|
|
40
|
+
return (0, react_1.cloneElement)(element, {
|
|
41
|
+
children: react_1.Children.map(element.props.children, child => {
|
|
42
|
+
let result;
|
|
43
|
+
if ((0, react_1.isValidElement)(child)) {
|
|
44
|
+
switch (true) {
|
|
45
|
+
// игнорируем или фильтруем кнопки-иконки на изображении
|
|
46
|
+
case Boolean(child.type === product_info_1.Parts.Image && hideImageButtons):
|
|
47
|
+
result = (0, react_1.cloneElement)(child, {
|
|
48
|
+
children: typeof hideImageButtons === 'function'
|
|
49
|
+
? react_1.Children.toArray(child.props.children).filter(hideImageButtons)
|
|
50
|
+
: undefined,
|
|
51
|
+
});
|
|
52
|
+
break;
|
|
53
|
+
// игнорируем футер
|
|
54
|
+
case Boolean(child.type === product_info_1.Parts.Footer && hideFooter):
|
|
55
|
+
result = null;
|
|
56
|
+
break;
|
|
57
|
+
// остальное оставляем без изменений
|
|
58
|
+
default:
|
|
59
|
+
result = child;
|
|
60
|
+
break;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
return result;
|
|
64
|
+
}),
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
exports.reduceBaseInfo = reduceBaseInfo;
|
|
68
|
+
/**
|
|
69
|
+
* Получив содержимое карточки фильтрует/меняет его для вывода в карточке при наведении.
|
|
70
|
+
* @param element Содержимое.
|
|
71
|
+
* @return Элемент.
|
|
72
|
+
*/
|
|
73
|
+
function reduceHoverInfo(element) {
|
|
74
|
+
return (0, react_1.cloneElement)(element, {
|
|
75
|
+
children: react_1.Children.map(element.props.children, child => {
|
|
76
|
+
let result;
|
|
77
|
+
if ((0, react_1.isValidElement)(child)) {
|
|
78
|
+
switch (child.type) {
|
|
79
|
+
// при наведении у изображения строго непрозрачность = 1
|
|
80
|
+
case product_info_1.Parts.Image:
|
|
81
|
+
result = (0, react_1.cloneElement)(child, { opacity: 1 });
|
|
82
|
+
break;
|
|
83
|
+
// остальное оставляем без изменений
|
|
84
|
+
default:
|
|
85
|
+
result = child;
|
|
86
|
+
break;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
return result;
|
|
90
|
+
}),
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
exports.reduceHoverInfo = reduceHoverInfo;
|
|
94
|
+
//# sourceMappingURL=product-card.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"product-card.js","sourceRoot":"","sources":["../../../../src/desktop/components/product-card/product-card.tsx"],"names":[],"mappings":";;;;;;;AAAA,iCAAqF;AAErF,0EAAgE;AAChE,wDAAiE;AACjE,4DAA0D;AAC1D,2DAAyC;AACzC,gFAA2C;AAE3C,MAAM,EAAE,GAAG,cAAU,CAAC,IAAI,CAAC,6BAAM,CAAC,CAAC;AAEnC;;;;GAIG;AACH,SAAgB,WAAW,CAAC;AAC1B,8GAA8G;AAC9G,cAAc,EAAE,kBAAkB,GAAG,cAAc,EACnD,eAAe,EAAE,mBAAmB,GAAG,eAAe,EACtD,QAAQ,EACR,SAAS,EACT,GAAG,KAAK,EACS;IAC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AE,CAAC,CAAC;wBAClD,MAAM;oBAER,oCAAoC;oBACpC;wBACE,MAAM,GAAG,KAAK,CAAC;wBACf,MAAM;gBACV,CAAC;YACH,CAAC;YAED,OAAO,MAAM,CAAC;QAChB,CAAC,CAAC;KACH,CAAC,CAAC;AACL,CAAC;AAtBD,0CAsBC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { HTMLAttributes, ReactElement, ReactNode } from 'react';
|
|
2
|
+
import type { ProductInfo, ProductInfoProps } from '../../../common/components/product-info';
|
|
3
|
+
/** Допустимое содержимое компонента ProductCard. */
|
|
4
|
+
export type ProductCardChildren = ReactElement<ProductInfoProps, typeof ProductInfo>;
|
|
5
|
+
export interface ProductCardProps extends HTMLAttributes<HTMLDivElement> {
|
|
6
|
+
/** Содержимое. */
|
|
7
|
+
children: ProductCardChildren;
|
|
8
|
+
/** Получив содержимое должен вернуть то что будет выведено без наведения. */
|
|
9
|
+
reduceBaseInfo?: (children: ProductCardChildren) => ReactNode;
|
|
10
|
+
/** Получив содержимое должен вернуть то что будет выведено во всплывающей карточке. */
|
|
11
|
+
reduceHoverInfo?: (children: ProductCardChildren) => ReactNode;
|
|
12
|
+
}
|
|
13
|
+
/** Опции фильтрации содержимого карточки без наведения. */
|
|
14
|
+
export interface ReduceBaseInfoOptions {
|
|
15
|
+
/** Надо ли скрыть кнопки на картинке. При передаче функции она будет применена для каждого дочернего элемента внутри картинки как фильтр. */
|
|
16
|
+
hideImageButtons?: boolean | ((element: ReactNode) => boolean);
|
|
17
|
+
/** Надо ли скрыть футер. */
|
|
18
|
+
hideFooter?: boolean;
|
|
19
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/desktop/components/product-card/types.ts"],"names":[],"mappings":""}
|
|
@@ -1,12 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { ProductInfoProps } from '../../../common/components/product-info';
|
|
3
|
-
export interface HoverCardProps extends ProductInfoProps {
|
|
4
|
-
targetRef: React.RefObject<HTMLElement | null>;
|
|
5
|
-
onMouseLeave?: () => void;
|
|
6
|
-
}
|
|
1
|
+
import { HoverCardProps } from './types';
|
|
7
2
|
/**
|
|
8
3
|
* Карточка товара, появляющаяся над элементом карусели.
|
|
9
4
|
* @param props Свойства компонента.
|
|
10
5
|
* @return Элемент.
|
|
11
6
|
*/
|
|
12
|
-
export declare
|
|
7
|
+
export declare function HoverCard({ targetRef, onMouseLeave, children }: HoverCardProps): import("react/jsx-runtime").JSX.Element;
|