@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,17 @@
|
|
|
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.Breadcrumbs = void 0;
|
|
7
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
|
+
const link_1 = require("@sima-land/ui-nucleons/link");
|
|
9
|
+
const breadcrumbs_m_scss_1 = __importDefault(require("./breadcrumbs.m.scss"));
|
|
10
|
+
/**
|
|
11
|
+
* Хлебные крошки.
|
|
12
|
+
* @param props Свойства.
|
|
13
|
+
* @return Элемент.
|
|
14
|
+
*/
|
|
15
|
+
const Breadcrumbs = ({ items }) => ((0, jsx_runtime_1.jsx)("nav", { className: breadcrumbs_m_scss_1.default.root, children: items.map((item, index) => ((0, jsx_runtime_1.jsx)(link_1.Link, { href: item.url, pseudo: !item.url, color: 'basic-gray87', className: breadcrumbs_m_scss_1.default.item, "data-testid": 'breadcrumb', children: item.name }, index))) }));
|
|
16
|
+
exports.Breadcrumbs = Breadcrumbs;
|
|
17
|
+
//# sourceMappingURL=breadcrumbs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"breadcrumbs.js","sourceRoot":"","sources":["../../../../src/mobile/components/breadcrumbs/breadcrumbs.tsx"],"names":[],"mappings":";;;;;;;AAAA,sDAAmD;AACnD,8EAA0C;AAS1C;;;;GAIG;AACI,MAAM,WAAW,GAAG,CAAC,EAAE,KAAK,EAAoB,EAAE,EAAE,CAAC,CAC1D,gCAAK,SAAS,EAAE,4BAAM,CAAC,IAAI,YACxB,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC,CAC1B,uBAAC,WAAI,IAEH,IAAI,EAAE,IAAI,CAAC,GAAG,EACd,MAAM,EAAE,CAAC,IAAI,CAAC,GAAG,EACjB,KAAK,EAAC,cAAc,EACpB,SAAS,EAAE,4BAAM,CAAC,IAAI,iBACV,YAAY,YAEvB,IAAI,CAAC,IAAI,IAPL,KAAK,CAQL,CACR,CAAC,GACE,CACP,CAAC;AAfW,QAAA,WAAW,eAetB"}
|
|
@@ -1,13 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export interface BreadcrumbsProps {
|
|
3
|
-
items: {
|
|
4
|
-
name: string;
|
|
5
|
-
url?: string;
|
|
6
|
-
}[];
|
|
7
|
-
}
|
|
8
|
-
/**
|
|
9
|
-
* Хлебные крошки.
|
|
10
|
-
* @param props Свойства.
|
|
11
|
-
* @return Элемент.
|
|
12
|
-
*/
|
|
13
|
-
export declare const Breadcrumbs: ({ items }: BreadcrumbsProps) => JSX.Element;
|
|
1
|
+
export { type BreadcrumbsProps, Breadcrumbs } from './breadcrumbs';
|
|
@@ -1,16 +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.Breadcrumbs = void 0;
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* Хлебные крошки.
|
|
12
|
-
* @param props Свойства.
|
|
13
|
-
* @return Элемент.
|
|
14
|
-
*/
|
|
15
|
-
const Breadcrumbs = ({ items }) => (react_1.default.createElement("nav", { className: breadcrumbs_module_scss_1.default.root }, items.map((item, index) => (react_1.default.createElement(link_1.Link, { key: index, href: item.url, pseudo: !item.url, color: 'basic-gray87', className: breadcrumbs_module_scss_1.default.item, "data-testid": 'breadcrumb' }, item.name)))));
|
|
16
|
-
exports.Breadcrumbs = Breadcrumbs;
|
|
4
|
+
var breadcrumbs_1 = require("./breadcrumbs");
|
|
5
|
+
Object.defineProperty(exports, "Breadcrumbs", { enumerable: true, get: function () { return breadcrumbs_1.Breadcrumbs; } });
|
|
6
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/mobile/components/breadcrumbs/index.ts"],"names":[],"mappings":";;;AAAA,6CAAmE;AAAnC,0GAAA,WAAW,OAAA"}
|
|
@@ -1,44 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export interface PersonInfoProps {
|
|
3
|
-
/** Специализация. */
|
|
4
|
-
appointment?: string;
|
|
5
|
-
/** Свойства произвольной ссылки. */
|
|
6
|
-
arbitraryLinkProps?: AnchorHTMLAttributes<HTMLAnchorElement>;
|
|
7
|
-
/** Адрес электронной почты. */
|
|
8
|
-
email?: string;
|
|
9
|
-
/** Имя. */
|
|
10
|
-
name?: string;
|
|
11
|
-
/** Ссылка на рабочий номер телефона. */
|
|
12
|
-
phoneHref?: string;
|
|
13
|
-
/** Рабочий номер телефона. */
|
|
14
|
-
phoneText?: string;
|
|
15
|
-
/** Ссылка на фото. */
|
|
16
|
-
photoUrl?: string;
|
|
17
|
-
/** Ссылка на сотовый номер телефона. */
|
|
18
|
-
secondPhoneHref?: string;
|
|
19
|
-
/** Сотовый номер телефона. */
|
|
20
|
-
secondPhoneText?: string;
|
|
21
|
-
/** Адрес Skype-аккаунта. */
|
|
22
|
-
skype?: string;
|
|
23
|
-
}
|
|
24
|
-
/**
|
|
25
|
-
* Информация о персоне.
|
|
26
|
-
* @param props Свойства.
|
|
27
|
-
* @return Элемент.
|
|
28
|
-
*/
|
|
29
|
-
export declare function PersonInfo({ name, appointment, photoUrl, email, skype, phoneHref, phoneText, secondPhoneHref, secondPhoneText, arbitraryLinkProps, }: PersonInfoProps): JSX.Element;
|
|
30
|
-
/**
|
|
31
|
-
* Компонент блока-ссылки для связи.
|
|
32
|
-
* @param props Свойства.
|
|
33
|
-
* @param props.href Ссылка.
|
|
34
|
-
* @param props.primaryText Основной текст.
|
|
35
|
-
* @param props.secondaryText Дополнительный текст.
|
|
36
|
-
* @param props.icon Иконка.
|
|
37
|
-
* @return Элемент.
|
|
38
|
-
*/
|
|
39
|
-
export declare function CommunicateLink({ href, primaryText, secondaryText, icon, }: {
|
|
40
|
-
href?: string;
|
|
41
|
-
primaryText?: string;
|
|
42
|
-
secondaryText?: string;
|
|
43
|
-
icon?: ReactNode;
|
|
44
|
-
}): JSX.Element;
|
|
1
|
+
export { type PersonInfoProps, PersonInfo } from './person-info';
|
|
@@ -1,57 +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
|
-
exports.
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
const box_1 = require("@sima-land/ui-nucleons/box");
|
|
11
|
-
const text_1 = require("@sima-land/ui-nucleons/text");
|
|
12
|
-
const borders_1 = require("@sima-land/ui-nucleons/styling/borders");
|
|
13
|
-
const mail_1 = __importDefault(require("@sima-land/ui-quarks/icons/24x24/Stroked/mail"));
|
|
14
|
-
const skype_1 = __importDefault(require("@sima-land/ui-quarks/icons/24x24/Stroked/skype"));
|
|
15
|
-
const phone_1 = __importDefault(require("@sima-land/ui-quarks/icons/24x24/Stroked/phone"));
|
|
16
|
-
const mobile_1 = __importDefault(require("@sima-land/ui-quarks/icons/24x24/Filled/mobile"));
|
|
17
|
-
const person_info_module_scss_1 = __importDefault(require("./person-info.module.scss"));
|
|
18
|
-
const cx = bind_1.default.bind(person_info_module_scss_1.default);
|
|
19
|
-
/**
|
|
20
|
-
* Информация о персоне.
|
|
21
|
-
* @param props Свойства.
|
|
22
|
-
* @return Элемент.
|
|
23
|
-
*/
|
|
24
|
-
function PersonInfo({ name, appointment, photoUrl, email, skype, phoneHref, phoneText, secondPhoneHref, secondPhoneText, arbitraryLinkProps, }) {
|
|
25
|
-
return (react_1.default.createElement(react_1.default.Fragment, null,
|
|
26
|
-
react_1.default.createElement("div", { className: cx('avatar', 'small') },
|
|
27
|
-
react_1.default.createElement(user_1.UserAvatar, { size: 64, title: name, imageUrl: photoUrl })),
|
|
28
|
-
react_1.default.createElement("div", { className: cx('avatar', 'big') },
|
|
29
|
-
react_1.default.createElement(user_1.UserAvatar, { size: 104, title: name, imageUrl: photoUrl })),
|
|
30
|
-
react_1.default.createElement("span", { className: cx('name') }, name),
|
|
31
|
-
Boolean(appointment) && react_1.default.createElement("span", { className: cx('appointment') }, appointment),
|
|
32
|
-
arbitraryLinkProps && (react_1.default.createElement("div", { className: cx('profile-url'), children: react_1.default.createElement("a", Object.assign({ className: cx('link') }, arbitraryLinkProps)) })),
|
|
33
|
-
react_1.default.createElement("div", { className: cx('items', borders_1.InnerBorder.bottom) },
|
|
34
|
-
Boolean(email) && (react_1.default.createElement(CommunicateLink, { href: `mailto:${email}`, primaryText: email, secondaryText: '\u042D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u0430\u044F \u043F\u043E\u0447\u0442\u0430', icon: react_1.default.createElement(mail_1.default, null) })),
|
|
35
|
-
Boolean(skype) && (react_1.default.createElement(CommunicateLink, { href: `skype:${skype}?chat`, primaryText: skype, secondaryText: 'Skype', icon: react_1.default.createElement(skype_1.default, null) })),
|
|
36
|
-
Boolean(phoneText) && (react_1.default.createElement(CommunicateLink, { href: phoneHref, primaryText: phoneText, secondaryText: '\u0420\u0430\u0431\u043E\u0447\u0438\u0439', icon: react_1.default.createElement(phone_1.default, null) })),
|
|
37
|
-
Boolean(secondPhoneText) && (react_1.default.createElement(CommunicateLink, { href: secondPhoneHref, primaryText: secondPhoneText, secondaryText: '\u0421\u043E\u0442\u043E\u0432\u044B\u0439', icon: react_1.default.createElement(mobile_1.default, null) })))));
|
|
38
|
-
}
|
|
39
|
-
exports.PersonInfo = PersonInfo;
|
|
40
|
-
/**
|
|
41
|
-
* Компонент блока-ссылки для связи.
|
|
42
|
-
* @param props Свойства.
|
|
43
|
-
* @param props.href Ссылка.
|
|
44
|
-
* @param props.primaryText Основной текст.
|
|
45
|
-
* @param props.secondaryText Дополнительный текст.
|
|
46
|
-
* @param props.icon Иконка.
|
|
47
|
-
* @return Элемент.
|
|
48
|
-
*/
|
|
49
|
-
function CommunicateLink({ href, primaryText, secondaryText, icon, }) {
|
|
50
|
-
return (react_1.default.createElement("a", { href: href, className: cx('item', borders_1.InnerBorder.top) },
|
|
51
|
-
react_1.default.createElement(box_1.Box, { flex: 'grow' },
|
|
52
|
-
react_1.default.createElement(text_1.Text, { size: 16, lineHeight: 24, color: 'basic-gray87', weight: 600 }, primaryText),
|
|
53
|
-
react_1.default.createElement(box_1.Box, { marginTop: 1 },
|
|
54
|
-
react_1.default.createElement(text_1.Text, { size: 14, lineHeight: 20, color: 'basic-gray38' }, secondaryText))),
|
|
55
|
-
react_1.default.createElement("div", { className: cx('icon-circle') }, icon)));
|
|
56
|
-
}
|
|
57
|
-
exports.CommunicateLink = CommunicateLink;
|
|
3
|
+
exports.PersonInfo = void 0;
|
|
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/mobile/components/person-info/index.ts"],"names":[],"mappings":";;;AAAA,6CAAiE;AAAlC,yGAAA,UAAU,OAAA"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { AnchorHTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
export interface PersonInfoProps {
|
|
3
|
+
/** Идентификатор. */
|
|
4
|
+
personId?: number;
|
|
5
|
+
/** Специализация. */
|
|
6
|
+
appointment?: string;
|
|
7
|
+
/** Свойства произвольной ссылки. */
|
|
8
|
+
arbitraryLinkProps?: AnchorHTMLAttributes<HTMLAnchorElement>;
|
|
9
|
+
/** Адрес электронной почты. */
|
|
10
|
+
email?: string;
|
|
11
|
+
/** Имя. */
|
|
12
|
+
name?: string;
|
|
13
|
+
/** Ссылка на рабочий номер телефона. */
|
|
14
|
+
phoneHref?: string;
|
|
15
|
+
/** Рабочий номер телефона. */
|
|
16
|
+
phoneText?: string;
|
|
17
|
+
/** Ссылка на фото. */
|
|
18
|
+
photoUrl?: string;
|
|
19
|
+
/** Ссылка на сотовый номер телефона. */
|
|
20
|
+
secondPhoneHref?: string;
|
|
21
|
+
/** Сотовый номер телефона. */
|
|
22
|
+
secondPhoneText?: string;
|
|
23
|
+
/** Адрес Skype-аккаунта. */
|
|
24
|
+
skype?: string;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Информация о персоне.
|
|
28
|
+
* @param props Свойства.
|
|
29
|
+
* @return Элемент.
|
|
30
|
+
*/
|
|
31
|
+
export declare function PersonInfo({ personId, name, appointment, photoUrl, email, skype, phoneHref, phoneText, secondPhoneHref, secondPhoneText, arbitraryLinkProps, }: PersonInfoProps): import("react/jsx-runtime").JSX.Element;
|
|
32
|
+
/**
|
|
33
|
+
* Компонент блока-ссылки для связи.
|
|
34
|
+
* @param props Свойства.
|
|
35
|
+
* @param props.href Ссылка.
|
|
36
|
+
* @param props.primaryText Основной текст.
|
|
37
|
+
* @param props.secondaryText Дополнительный текст.
|
|
38
|
+
* @param props.icon Иконка.
|
|
39
|
+
* @return Элемент.
|
|
40
|
+
*/
|
|
41
|
+
export declare function CommunicateLink({ href, primaryText, secondaryText, icon, }: {
|
|
42
|
+
href?: string;
|
|
43
|
+
primaryText?: string;
|
|
44
|
+
secondaryText?: string;
|
|
45
|
+
icon?: ReactNode;
|
|
46
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,41 @@
|
|
|
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.CommunicateLink = exports.PersonInfo = void 0;
|
|
7
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
|
+
const bind_1 = __importDefault(require("classnames/bind"));
|
|
9
|
+
const avatar_1 = require("@sima-land/ui-nucleons/avatar");
|
|
10
|
+
const box_1 = require("@sima-land/ui-nucleons/box");
|
|
11
|
+
const text_1 = require("@sima-land/ui-nucleons/text");
|
|
12
|
+
const styling_1 = require("@sima-land/ui-nucleons/styling");
|
|
13
|
+
const Mail_1 = __importDefault(require("@sima-land/ui-quarks/icons/24x24/Stroked/Mail"));
|
|
14
|
+
const LogoSkype_1 = __importDefault(require("@sima-land/ui-quarks/icons/24x24/Stroked/LogoSkype"));
|
|
15
|
+
const Phone_1 = __importDefault(require("@sima-land/ui-quarks/icons/24x24/Stroked/Phone"));
|
|
16
|
+
const Mobile_1 = __importDefault(require("@sima-land/ui-quarks/icons/24x24/Filled/Mobile"));
|
|
17
|
+
const person_info_m_scss_1 = __importDefault(require("./person-info.m.scss"));
|
|
18
|
+
const cx = bind_1.default.bind(person_info_m_scss_1.default);
|
|
19
|
+
/**
|
|
20
|
+
* Информация о персоне.
|
|
21
|
+
* @param props Свойства.
|
|
22
|
+
* @return Элемент.
|
|
23
|
+
*/
|
|
24
|
+
function PersonInfo({ personId, name, appointment, photoUrl, email, skype, phoneHref, phoneText, secondPhoneHref, secondPhoneText, arbitraryLinkProps, }) {
|
|
25
|
+
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("div", { className: cx('avatar'), children: (0, jsx_runtime_1.jsx)(avatar_1.Avatar, { ...(0, avatar_1.getUserAvatarProps)({ id: personId, name, image: photoUrl }) }) }), (0, jsx_runtime_1.jsx)("span", { className: cx('name'), children: name }), Boolean(appointment) && (0, jsx_runtime_1.jsx)("span", { className: cx('appointment'), children: appointment }), arbitraryLinkProps && ((0, jsx_runtime_1.jsx)("div", { className: cx('profile-url'), children: (0, jsx_runtime_1.jsx)("a", { className: cx('link'), ...arbitraryLinkProps }) })), (0, jsx_runtime_1.jsxs)("div", { className: cx('items', styling_1.InnerBorder.bottom), children: [Boolean(email) && ((0, jsx_runtime_1.jsx)(CommunicateLink, { href: `mailto:${email}`, primaryText: email, secondaryText: '\u042D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u0430\u044F \u043F\u043E\u0447\u0442\u0430', icon: (0, jsx_runtime_1.jsx)(Mail_1.default, {}) })), Boolean(skype) && ((0, jsx_runtime_1.jsx)(CommunicateLink, { href: `skype:${skype}?chat`, primaryText: skype, secondaryText: 'Skype', icon: (0, jsx_runtime_1.jsx)(LogoSkype_1.default, {}) })), Boolean(phoneText) && ((0, jsx_runtime_1.jsx)(CommunicateLink, { href: phoneHref, primaryText: phoneText, secondaryText: '\u0420\u0430\u0431\u043E\u0447\u0438\u0439', icon: (0, jsx_runtime_1.jsx)(Phone_1.default, {}) })), Boolean(secondPhoneText) && ((0, jsx_runtime_1.jsx)(CommunicateLink, { href: secondPhoneHref, primaryText: secondPhoneText, secondaryText: '\u0421\u043E\u0442\u043E\u0432\u044B\u0439', icon: (0, jsx_runtime_1.jsx)(Mobile_1.default, {}) }))] })] }));
|
|
26
|
+
}
|
|
27
|
+
exports.PersonInfo = PersonInfo;
|
|
28
|
+
/**
|
|
29
|
+
* Компонент блока-ссылки для связи.
|
|
30
|
+
* @param props Свойства.
|
|
31
|
+
* @param props.href Ссылка.
|
|
32
|
+
* @param props.primaryText Основной текст.
|
|
33
|
+
* @param props.secondaryText Дополнительный текст.
|
|
34
|
+
* @param props.icon Иконка.
|
|
35
|
+
* @return Элемент.
|
|
36
|
+
*/
|
|
37
|
+
function CommunicateLink({ href, primaryText, secondaryText, icon, }) {
|
|
38
|
+
return ((0, jsx_runtime_1.jsxs)("a", { href: href, className: cx('item', styling_1.InnerBorder.top), children: [(0, jsx_runtime_1.jsxs)(box_1.Box, { flex: 'grow', children: [(0, jsx_runtime_1.jsx)(text_1.Text, { size: 16, lineHeight: 24, color: 'basic-gray87', weight: 600, children: primaryText }), (0, jsx_runtime_1.jsx)(box_1.Box, { marginTop: 1, children: (0, jsx_runtime_1.jsx)(text_1.Text, { size: 14, lineHeight: 20, color: 'basic-gray38', children: secondaryText }) })] }), (0, jsx_runtime_1.jsx)("div", { className: cx('icon-circle'), children: icon })] }));
|
|
39
|
+
}
|
|
40
|
+
exports.CommunicateLink = CommunicateLink;
|
|
41
|
+
//# sourceMappingURL=person-info.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"person-info.js","sourceRoot":"","sources":["../../../../src/mobile/components/person-info/person-info.tsx"],"names":[],"mappings":"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"}
|
|
@@ -1,20 +1,13 @@
|
|
|
1
|
-
@
|
|
1
|
+
@use 'node_modules/@sima-land/ui-nucleons/colors';
|
|
2
2
|
|
|
3
3
|
.avatar {
|
|
4
4
|
display: flex;
|
|
5
5
|
justify-content: center;
|
|
6
6
|
margin-top: 8px;
|
|
7
|
-
|
|
8
|
-
display: none;
|
|
9
|
-
}
|
|
7
|
+
--avatar-size: 64px;
|
|
10
8
|
@media (min-width: 721px) {
|
|
9
|
+
--avatar-size: 104px;
|
|
11
10
|
margin-top: 56px;
|
|
12
|
-
&.small {
|
|
13
|
-
display: none;
|
|
14
|
-
}
|
|
15
|
-
&.big {
|
|
16
|
-
display: flex;
|
|
17
|
-
}
|
|
18
11
|
}
|
|
19
12
|
}
|
|
20
13
|
|
|
@@ -24,8 +17,8 @@
|
|
|
24
17
|
text-align: center;
|
|
25
18
|
font-size: 20px;
|
|
26
19
|
line-height: 28px;
|
|
27
|
-
font-weight:
|
|
28
|
-
color:
|
|
20
|
+
font-weight: 600;
|
|
21
|
+
color: colors.$basic-gray87;
|
|
29
22
|
word-wrap: break-word;
|
|
30
23
|
-webkit-line-clamp: 2;
|
|
31
24
|
-webkit-box-orient: vertical;
|
|
@@ -44,7 +37,7 @@
|
|
|
44
37
|
text-align: center;
|
|
45
38
|
font-size: 14px;
|
|
46
39
|
line-height: 20px;
|
|
47
|
-
color:
|
|
40
|
+
color: colors.$basic-gray38;
|
|
48
41
|
@media (min-width: 601px) {
|
|
49
42
|
max-width: none;
|
|
50
43
|
margin: 8px auto 0;
|
|
@@ -62,10 +55,10 @@
|
|
|
62
55
|
}
|
|
63
56
|
.link {
|
|
64
57
|
text-decoration: none;
|
|
65
|
-
font-weight:
|
|
58
|
+
font-weight: 600;
|
|
66
59
|
font-size: 14px;
|
|
67
60
|
line-height: 20px;
|
|
68
|
-
color:
|
|
61
|
+
color: colors.$basic-blue;
|
|
69
62
|
}
|
|
70
63
|
}
|
|
71
64
|
|
|
@@ -96,7 +89,7 @@
|
|
|
96
89
|
}
|
|
97
90
|
|
|
98
91
|
.icon-circle {
|
|
99
|
-
background:
|
|
92
|
+
background: colors.$basic-gray4;
|
|
100
93
|
border-radius: 50%;
|
|
101
94
|
width: 48px;
|
|
102
95
|
height: 48px;
|
|
@@ -1,41 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export interface ProductRowProps {
|
|
3
|
-
/** Общая сумма товара. */
|
|
4
|
-
commonPrice: number;
|
|
5
|
-
/** Количество товара, которое будет доставлено. */
|
|
6
|
-
count?: number;
|
|
7
|
-
/** Символ валюты. */
|
|
8
|
-
currencyGrapheme: string;
|
|
9
|
-
/** Ссылка на картинку товара. */
|
|
10
|
-
imageUrl: string;
|
|
11
|
-
/** Изначально добавленное количество товара при заказе. */
|
|
12
|
-
initialCount?: number;
|
|
13
|
-
/** Признак загрузки добавления товара в список избранного. */
|
|
14
|
-
isFetchingWishItems?: boolean;
|
|
15
|
-
/** Товар добавлен в избранное. */
|
|
16
|
-
isWished?: boolean;
|
|
17
|
-
/** Цена товара за единицу. */
|
|
18
|
-
itemPrice: number;
|
|
19
|
-
/** Ссылка на страницу товара. */
|
|
20
|
-
itemUrl: string;
|
|
21
|
-
/** Id заказа в который перемещен товар. */
|
|
22
|
-
movedOrderId?: number;
|
|
23
|
-
/** Название товара. */
|
|
24
|
-
name: string;
|
|
25
|
-
/** Признак товара не в наличии. */
|
|
26
|
-
notInStock?: boolean;
|
|
27
|
-
/** Обработчик нажатия на кнопку действий над товаром. */
|
|
28
|
-
onActionsClick?: () => void;
|
|
29
|
-
/** Обработчик добавления/удаления в избранное. */
|
|
30
|
-
onWishButtonClick?: () => void;
|
|
31
|
-
/** Артикул товара. */
|
|
32
|
-
sid: number;
|
|
33
|
-
/** Единицы измерения. */
|
|
34
|
-
unit: string;
|
|
35
|
-
}
|
|
36
|
-
/**
|
|
37
|
-
* Карточка товара для вертикальных списков товаров.
|
|
38
|
-
* @param props Свойства.
|
|
39
|
-
* @return Элемент.
|
|
40
|
-
*/
|
|
41
|
-
export declare function ProductRow({ itemUrl, imageUrl, name, sid, isWished, count, unit, initialCount, movedOrderId, notInStock, currencyGrapheme, commonPrice, itemPrice, onWishButtonClick, onActionsClick, isFetchingWishItems, }: ProductRowProps): JSX.Element;
|
|
1
|
+
export { type ProductRowProps, ProductRow } from './product-row';
|
|
@@ -1,59 +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.ProductRow = void 0;
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
const more_1 = __importDefault(require("@sima-land/ui-quarks/icons/24x24/Filled/more"));
|
|
11
|
-
const link_1 = require("@sima-land/ui-nucleons/link");
|
|
12
|
-
const price_1 = require("@sima-land/ui-nucleons/price");
|
|
13
|
-
const box_1 = require("@sima-land/ui-nucleons/box");
|
|
14
|
-
const text_1 = require("@sima-land/ui-nucleons/text");
|
|
15
|
-
const stroked_svg_1 = require("@sima-land/ui-nucleons/stroked-svg");
|
|
16
|
-
const favorite_1 = __importDefault(require("@sima-land/ui-quarks/icons/24x24/Filled/favorite"));
|
|
17
|
-
const favorite_2 = __importDefault(require("@sima-land/ui-quarks/icons/24x24/Stroked/favorite"));
|
|
18
|
-
const colors_1 = require("@sima-land/ui-nucleons/colors");
|
|
19
|
-
const cx = bind_1.default.bind(product_row_module_scss_1.default);
|
|
20
|
-
/**
|
|
21
|
-
* Карточка товара для вертикальных списков товаров.
|
|
22
|
-
* @param props Свойства.
|
|
23
|
-
* @return Элемент.
|
|
24
|
-
*/
|
|
25
|
-
function ProductRow({ itemUrl, imageUrl, name, sid, isWished, count, unit, initialCount, movedOrderId, notInStock, currencyGrapheme, commonPrice, itemPrice, onWishButtonClick, onActionsClick, isFetchingWishItems, }) {
|
|
26
|
-
return (react_1.default.createElement("div", { className: cx('wrapper') },
|
|
27
|
-
react_1.default.createElement("div", { className: cx('image-wrapper') },
|
|
28
|
-
react_1.default.createElement(link_1.Link, { href: itemUrl },
|
|
29
|
-
react_1.default.createElement("img", { src: imageUrl, className: cx('image') })),
|
|
30
|
-
onWishButtonClick && (react_1.default.createElement(stroked_svg_1.StrokedSVG, { className: cx('wish-button'), fill: isWished ? colors_1.COLORS.get('additional-red') : undefined, component: isWished ? favorite_1.default : favorite_2.default, onClick: isFetchingWishItems ? undefined : onWishButtonClick }))),
|
|
31
|
-
react_1.default.createElement("div", { className: cx('info-column') },
|
|
32
|
-
react_1.default.createElement(link_1.Link, { href: itemUrl, className: cx('link'), color: 'basic-gray87' },
|
|
33
|
-
react_1.default.createElement(text_1.Text, { weight: 600 }, name)),
|
|
34
|
-
react_1.default.createElement(box_1.Box, { marginTop: 2 },
|
|
35
|
-
react_1.default.createElement(text_1.Text, { color: 'basic-gray38' },
|
|
36
|
-
"\u0410\u0440\u0442.: ",
|
|
37
|
-
sid)),
|
|
38
|
-
Boolean(initialCount) && (react_1.default.createElement(box_1.Box, { marginTop: 2 },
|
|
39
|
-
react_1.default.createElement(text_1.Text, { element: 'div', size: 12 },
|
|
40
|
-
react_1.default.createElement("div", null, `Было в заказе: ${initialCount} ${unit}`),
|
|
41
|
-
react_1.default.createElement("div", null, `Вы получите: ${count} ${unit}`)))),
|
|
42
|
-
Boolean(itemPrice) && (react_1.default.createElement(box_1.Box, { marginTop: 2 },
|
|
43
|
-
react_1.default.createElement(text_1.Text, { element: 'div', weight: 600, size: 12 },
|
|
44
|
-
react_1.default.createElement(price_1.Price, { value: itemPrice, currencyGrapheme: currencyGrapheme }),
|
|
45
|
-
` × ${count} ${unit}`))),
|
|
46
|
-
Boolean(commonPrice && itemPrice) && (react_1.default.createElement(box_1.Box, { marginTop: 4 },
|
|
47
|
-
react_1.default.createElement(text_1.Text, { element: 'div', weight: 600 },
|
|
48
|
-
react_1.default.createElement(price_1.Price, { value: commonPrice, currencyGrapheme: currencyGrapheme })))),
|
|
49
|
-
Boolean(movedOrderId) && (react_1.default.createElement(box_1.Box, { marginTop: 2 },
|
|
50
|
-
react_1.default.createElement(text_1.Text, { element: 'div', color: 'basic-gray38' }, "\u041F\u0435\u0440\u0435\u043C\u0435\u0449\u0435\u043D \u0432 \u0437\u0430\u043A\u0430\u0437"),
|
|
51
|
-
react_1.default.createElement(link_1.Link, null,
|
|
52
|
-
"\u2116",
|
|
53
|
-
movedOrderId))),
|
|
54
|
-
notInStock && (react_1.default.createElement(box_1.Box, { marginTop: 2 },
|
|
55
|
-
react_1.default.createElement(text_1.Text, { element: 'div', color: 'basic-gray38' }, "\u041D\u0435\u0442 \u043D\u0430 \u0441\u043A\u043B\u0430\u0434\u0435")))),
|
|
56
|
-
react_1.default.createElement("div", { className: cx('action-button') },
|
|
57
|
-
react_1.default.createElement(more_1.default, { onClick: onActionsClick }))));
|
|
58
|
-
}
|
|
59
|
-
exports.ProductRow = ProductRow;
|
|
4
|
+
var product_row_1 = require("./product-row");
|
|
5
|
+
Object.defineProperty(exports, "ProductRow", { enumerable: true, get: function () { return product_row_1.ProductRow; } });
|
|
6
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/mobile/components/product-row/index.ts"],"names":[],"mappings":";;;AAAA,6CAAiE;AAAlC,yGAAA,UAAU,OAAA"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
export interface ProductRowProps {
|
|
2
|
+
/** Общая сумма товара. */
|
|
3
|
+
commonPrice: number;
|
|
4
|
+
/** Количество товара, которое будет доставлено. */
|
|
5
|
+
count?: number;
|
|
6
|
+
/** Символ валюты. */
|
|
7
|
+
currencyGrapheme: string;
|
|
8
|
+
/** Ссылка на картинку товара. */
|
|
9
|
+
imageUrl: string;
|
|
10
|
+
/** Изначально добавленное количество товара при заказе. */
|
|
11
|
+
initialCount?: number;
|
|
12
|
+
/** Признак загрузки добавления товара в список избранного. */
|
|
13
|
+
isFetchingWishItems?: boolean;
|
|
14
|
+
/** Товар добавлен в избранное. */
|
|
15
|
+
isWished?: boolean;
|
|
16
|
+
/** Цена товара за единицу. */
|
|
17
|
+
itemPrice: number;
|
|
18
|
+
/** Ссылка на страницу товара. */
|
|
19
|
+
itemUrl: string;
|
|
20
|
+
/** Id заказа в который перемещен товар. */
|
|
21
|
+
movedOrderId?: number;
|
|
22
|
+
/** Название товара. */
|
|
23
|
+
name: string;
|
|
24
|
+
/** Признак товара не в наличии. */
|
|
25
|
+
notInStock?: boolean;
|
|
26
|
+
/** Обработчик нажатия на кнопку действий над товаром. */
|
|
27
|
+
onActionsClick?: () => void;
|
|
28
|
+
/** Обработчик добавления/удаления в избранное. */
|
|
29
|
+
onWishButtonClick?: () => void;
|
|
30
|
+
/** Артикул товара. */
|
|
31
|
+
sid: number;
|
|
32
|
+
/** Единицы измерения. */
|
|
33
|
+
unit: string;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Карточка товара для вертикальных списков товаров.
|
|
37
|
+
* @param props Свойства.
|
|
38
|
+
* @return Элемент.
|
|
39
|
+
*/
|
|
40
|
+
export declare function ProductRow({ itemUrl, imageUrl, name, sid, isWished, count, unit, initialCount, movedOrderId, notInStock, currencyGrapheme, commonPrice, itemPrice, onWishButtonClick, onActionsClick, isFetchingWishItems, }: ProductRowProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,29 @@
|
|
|
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.ProductRow = void 0;
|
|
7
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
|
+
const product_row_m_scss_1 = __importDefault(require("./product-row.m.scss"));
|
|
9
|
+
const bind_1 = __importDefault(require("classnames/bind"));
|
|
10
|
+
const link_1 = require("@sima-land/ui-nucleons/link");
|
|
11
|
+
const price_1 = require("@sima-land/ui-nucleons/price");
|
|
12
|
+
const box_1 = require("@sima-land/ui-nucleons/box");
|
|
13
|
+
const text_1 = require("@sima-land/ui-nucleons/text");
|
|
14
|
+
const stroked_svg_1 = require("@sima-land/ui-nucleons/stroked-svg");
|
|
15
|
+
const More_1 = __importDefault(require("@sima-land/ui-quarks/icons/24x24/Filled/More"));
|
|
16
|
+
const Favorite_1 = __importDefault(require("@sima-land/ui-quarks/icons/24x24/Filled/Favorite"));
|
|
17
|
+
const Favorite_2 = __importDefault(require("@sima-land/ui-quarks/icons/24x24/Stroked/Favorite"));
|
|
18
|
+
const colors_1 = require("@sima-land/ui-nucleons/colors");
|
|
19
|
+
const cx = bind_1.default.bind(product_row_m_scss_1.default);
|
|
20
|
+
/**
|
|
21
|
+
* Карточка товара для вертикальных списков товаров.
|
|
22
|
+
* @param props Свойства.
|
|
23
|
+
* @return Элемент.
|
|
24
|
+
*/
|
|
25
|
+
function ProductRow({ itemUrl, imageUrl, name, sid, isWished, count, unit, initialCount, movedOrderId, notInStock, currencyGrapheme, commonPrice, itemPrice, onWishButtonClick, onActionsClick, isFetchingWishItems, }) {
|
|
26
|
+
return ((0, jsx_runtime_1.jsxs)("div", { className: cx('wrapper'), children: [(0, jsx_runtime_1.jsxs)("div", { className: cx('image-wrapper'), children: [(0, jsx_runtime_1.jsx)(link_1.Link, { href: itemUrl, children: (0, jsx_runtime_1.jsx)("img", { src: imageUrl, className: cx('image') }) }), onWishButtonClick && ((0, jsx_runtime_1.jsx)(stroked_svg_1.StrokedSVG, { className: cx('wish-button'), fill: isWished ? colors_1.COLORS.get('additional-red') : undefined, component: isWished ? Favorite_1.default : Favorite_2.default, onClick: isFetchingWishItems ? undefined : onWishButtonClick }))] }), (0, jsx_runtime_1.jsxs)("div", { className: cx('info-column'), children: [(0, jsx_runtime_1.jsx)(link_1.Link, { href: itemUrl, className: cx('link'), color: 'basic-gray87', children: (0, jsx_runtime_1.jsx)(text_1.Text, { weight: 600, children: name }) }), (0, jsx_runtime_1.jsx)(box_1.Box, { marginTop: 2, children: (0, jsx_runtime_1.jsxs)(text_1.Text, { color: 'basic-gray38', children: ["\u0410\u0440\u0442.: ", sid] }) }), Boolean(initialCount) && ((0, jsx_runtime_1.jsx)(box_1.Box, { marginTop: 2, children: (0, jsx_runtime_1.jsxs)(text_1.Text, { element: 'div', size: 12, children: [(0, jsx_runtime_1.jsx)("div", { children: `Было в заказе: ${initialCount} ${unit}` }), (0, jsx_runtime_1.jsx)("div", { children: `Вы получите: ${count} ${unit}` })] }) })), Boolean(itemPrice) && ((0, jsx_runtime_1.jsx)(box_1.Box, { marginTop: 2, children: (0, jsx_runtime_1.jsxs)(text_1.Text, { element: 'div', weight: 600, size: 12, children: [(0, jsx_runtime_1.jsx)(price_1.Price, { value: itemPrice, currencyGrapheme: currencyGrapheme }), ` × ${count} ${unit}`] }) })), Boolean(commonPrice && itemPrice) && ((0, jsx_runtime_1.jsx)(box_1.Box, { marginTop: 4, children: (0, jsx_runtime_1.jsx)(text_1.Text, { element: 'div', weight: 600, children: (0, jsx_runtime_1.jsx)(price_1.Price, { value: commonPrice, currencyGrapheme: currencyGrapheme }) }) })), Boolean(movedOrderId) && ((0, jsx_runtime_1.jsxs)(box_1.Box, { marginTop: 2, children: [(0, jsx_runtime_1.jsx)(text_1.Text, { element: 'div', color: 'basic-gray38', children: "\u041F\u0435\u0440\u0435\u043C\u0435\u0449\u0435\u043D \u0432 \u0437\u0430\u043A\u0430\u0437" }), (0, jsx_runtime_1.jsxs)(link_1.Link, { children: ["\u2116", movedOrderId] })] })), notInStock && ((0, jsx_runtime_1.jsx)(box_1.Box, { marginTop: 2, children: (0, jsx_runtime_1.jsx)(text_1.Text, { element: 'div', color: 'basic-gray38', children: "\u041D\u0435\u0442 \u043D\u0430 \u0441\u043A\u043B\u0430\u0434\u0435" }) }))] }), (0, jsx_runtime_1.jsx)("div", { className: cx('action-button'), children: (0, jsx_runtime_1.jsx)(More_1.default, { onClick: onActionsClick }) })] }));
|
|
27
|
+
}
|
|
28
|
+
exports.ProductRow = ProductRow;
|
|
29
|
+
//# sourceMappingURL=product-row.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"product-row.js","sourceRoot":"","sources":["../../../../src/mobile/components/product-row/product-row.tsx"],"names":[],"mappings":"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"}
|
|
@@ -1,17 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import { ProductInfo, ProductInfoProps } from '../../../common/components/product-info';
|
|
3
|
-
export type ItemElement = React.ReactElement<ProductInfoProps, typeof ProductInfo>;
|
|
4
|
-
export interface ProductSliderProps {
|
|
5
|
-
/** Товары. */
|
|
6
|
-
children?: ItemElement | ItemElement[];
|
|
7
|
-
/** Функция, вызываемая при попадании компонента в поле видимости. */
|
|
8
|
-
onInViewport?: () => void;
|
|
9
|
-
/** Функция, инициализирующая загрузку рекомендаций. */
|
|
10
|
-
onNeedRequest?: () => void;
|
|
11
|
-
}
|
|
12
|
-
/**
|
|
13
|
-
* Слайдер товаров.
|
|
14
|
-
* @param props Свойства.
|
|
15
|
-
* @return Элемент.
|
|
16
|
-
*/
|
|
17
|
-
export declare const ProductSlider: ({ children, onInViewport, onNeedRequest }: ProductSliderProps) => JSX.Element;
|
|
1
|
+
export { type ProductSliderProps, ProductSlider } from './product-slider';
|
|
@@ -1,60 +1,6 @@
|
|
|
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 __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
|
-
};
|
|
28
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
3
|
exports.ProductSlider = void 0;
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
const product_info_1 = require("../../../common/components/product-info");
|
|
34
|
-
const product_slider_module_scss_1 = __importDefault(require("./product-slider.module.scss"));
|
|
35
|
-
/**
|
|
36
|
-
* Слайдер товаров.
|
|
37
|
-
* @param props Свойства.
|
|
38
|
-
* @return Элемент.
|
|
39
|
-
*/
|
|
40
|
-
const ProductSlider = ({ children, onInViewport, onNeedRequest }) => {
|
|
41
|
-
const rootRef = (0, react_1.useRef)(null);
|
|
42
|
-
// инициируем загрузку данных, когда компонент почти попал в зону видимости
|
|
43
|
-
const options = (0, react_1.useMemo)(() => ({ rootMargin: '200px 0px 200px 0px' }), []);
|
|
44
|
-
(0, intersection_1.useIntersection)(rootRef, entry => {
|
|
45
|
-
entry.isIntersecting && (onNeedRequest === null || onNeedRequest === void 0 ? void 0 : onNeedRequest());
|
|
46
|
-
}, options);
|
|
47
|
-
// сообщаем, когда компонент попадет в зону видимости
|
|
48
|
-
(0, intersection_1.useIntersection)(rootRef, entry => {
|
|
49
|
-
entry.isIntersecting && (onInViewport === null || onInViewport === void 0 ? void 0 : onInViewport());
|
|
50
|
-
});
|
|
51
|
-
return (react_1.default.createElement("div", { ref: rootRef, "data-testid": 'product-slider:root' },
|
|
52
|
-
react_1.default.createElement(touch_slider_1.TouchSlider, null,
|
|
53
|
-
react_1.default.createElement(product_info_1.Parts.FooterContext.Provider, { value: { className: product_slider_module_scss_1.default.footer } }, react_1.Children.toArray(children).reduce((list, item) => {
|
|
54
|
-
(0, react_1.isValidElement)(item) &&
|
|
55
|
-
item.type === product_info_1.ProductInfo &&
|
|
56
|
-
list.push(react_1.default.createElement("div", { key: item.key, className: product_slider_module_scss_1.default.item, "data-testid": 'product-slider:item' }, item));
|
|
57
|
-
return list;
|
|
58
|
-
}, [])))));
|
|
59
|
-
};
|
|
60
|
-
exports.ProductSlider = ProductSlider;
|
|
4
|
+
var product_slider_1 = require("./product-slider");
|
|
5
|
+
Object.defineProperty(exports, "ProductSlider", { enumerable: true, get: function () { return product_slider_1.ProductSlider; } });
|
|
6
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/mobile/components/product-slider/index.ts"],"names":[],"mappings":";;;AAAA,mDAA0E;AAAxC,+GAAA,aAAa,OAAA"}
|